diff options
author | Matt Butcher <[email protected]> | 2013-06-13 22:54:27 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-06-13 22:54:27 -0500 |
commit | f4708bfbe48a1b4d3635793a08473c54a18eeced (patch) | |
tree | d848f7f5f0cb66bc8fed5dd09b68680df5d6d384 /src | |
parent | eaa00641ee4664d763336e398835002c3741a0f7 (diff) | |
parent | b20e2f740c2c6c016299de65ca37906786eb5f7e (diff) |
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'src')
-rw-r--r-- | src/HTML5/Serializer/OutputRules.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index bd97cb3..79b14b5 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -57,7 +57,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { $this->inSvg = TRUE; $name = Elements::normalizeSvgElement($name); break; - case 'mathml': + case 'math': $this->inMathMl = TRUE; break; } @@ -74,7 +74,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { case 'svg': $this->inSvg = FALSE; break; - case 'mathml': + case 'math': $this->inMathMl = FALSE; break; } @@ -158,7 +158,10 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { $name = Elements::normalizeMathMlAttribute($name); } - $this->wr(' ')->wr($name)->wr('="')->wr($val)->wr('"'); + $this->wr(' ')->wr($name); + if (!empty($val)) { + $this->wr('="')->wr($val)->wr('"'); + } } } |