html5 parser - numeric attribute names chucking a wobbly.
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user