summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-06-12 23:14:41 -0400
committerMatt Farina <[email protected]>2013-06-12 23:14:41 -0400
commitb20e2f740c2c6c016299de65ca37906786eb5f7e (patch)
tree924afc7fd49907f48516587cd0e86f6661a476cc /src
parent254ca181261fb5326dc3c9688562f800f18dd2e7 (diff)
Added support for attributes without values and a attribute test.
Diffstat (limited to 'src')
-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('"');
+ }
}
}