Browse Source

html5 - don't set empty attribute either

pull/4/merge
friendica 10 years ago
parent
commit
ef79a7a4fc
  1. 2
      library/HTML5/TreeBuilder.php

2
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']);
}
}

Loading…
Cancel
Save