mirror of
https://github.com/friendica/friendica
synced 2025-04-26 08:30:10 +00:00
html5 parser - numeric attribute names chucking a wobbly.
This commit is contained in:
parent
20217c04f0
commit
c9014a111f
2 changed files with 3 additions and 3 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue