From ef79a7a4fc7bbde7a79b5f57c248dd60f7d3005a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 Nov 2011 14:05:40 -0800 Subject: [PATCH] html5 - don't set empty attribute either --- library/HTML5/TreeBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php index c0074ec73..10d446d1e 100644 --- a/library/HTML5/TreeBuilder.php +++ b/library/HTML5/TreeBuilder.php @@ -3043,7 +3043,7 @@ class HTML5_TreeBuilder { foreach($token['attr'] as $attr) { // 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']) && (! is_numeric($attr['name']))) { + if($attr['name'] && (!$el->hasAttribute($attr['name'])) && (! is_numeric($attr['name']))) { $el->setAttribute($attr['name'], $attr['value']); } }