summaryrefslogtreecommitdiff
path: root/src/HTML5
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5')
-rw-r--r--src/HTML5/Serializer/OutputRules.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php
index 862ab55..79b14b5 100644
--- a/src/HTML5/Serializer/OutputRules.php
+++ b/src/HTML5/Serializer/OutputRules.php
@@ -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('"');
+ }
}
}