aboutsummaryrefslogtreecommitdiffstats
path: root/library/HTML5/TreeBuilder.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-11-11 14:21:52 -0800
committerFriendika <info@friendika.com>2011-11-11 14:21:52 -0800
commitc9014a111f31425a31dbf935965287471a7a6acb (patch)
tree89978961ebcff76dcd078b76983398d23a1769ca /library/HTML5/TreeBuilder.php
parent20217c04f086479fd5fb50bacb2e5e98977fc137 (diff)
downloadvolse-hubzilla-c9014a111f31425a31dbf935965287471a7a6acb.tar.gz
volse-hubzilla-c9014a111f31425a31dbf935965287471a7a6acb.tar.bz2
volse-hubzilla-c9014a111f31425a31dbf935965287471a7a6acb.zip
html5 parser - numeric attribute names chucking a wobbly.
Diffstat (limited to 'library/HTML5/TreeBuilder.php')
-rw-r--r--library/HTML5/TreeBuilder.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php
index a64816f56..c0074ec73 100644
--- a/library/HTML5/TreeBuilder.php
+++ b/library/HTML5/TreeBuilder.php
@@ -3041,9 +3041,9 @@ class HTML5_TreeBuilder {
if (!empty($token['attr'])) {
foreach($token['attr'] as $attr) {
- // mike@macgirvin.com 2011-10-21, stray double quotes cause everything to abort
+ // mike@macgirvin.com 2011-10-21, stray double quotes and/or numeric tags cause everything to abort
$attr['name'] = str_replace('"','',$attr['name']);
- if(!$el->hasAttribute($attr['name'])) {
+ if(!$el->hasAttribute($attr['name']) && (! is_numeric($attr['name']))) {
$el->setAttribute($attr['name'], $attr['value']);
}
}