diff options
Diffstat (limited to 'src/HTML5/Parser/DOMTreeBuilder.php')
-rw-r--r-- | src/HTML5/Parser/DOMTreeBuilder.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/HTML5/Parser/DOMTreeBuilder.php b/src/HTML5/Parser/DOMTreeBuilder.php index ccad229..b26860d 100644 --- a/src/HTML5/Parser/DOMTreeBuilder.php +++ b/src/HTML5/Parser/DOMTreeBuilder.php @@ -274,7 +274,8 @@ class DOMTreeBuilder implements EventHandler // SPECIAL TAG HANDLING: // Spec says do this, and "don't ask." - if ($name == 'image') { + // find the spec where this is defined... looks problematic + if ($name == 'image' && !($this->insertMode === static::IM_IN_SVG || $this->insertMode === static::IM_IN_MATHML)) { $name = 'img'; } @@ -681,4 +682,4 @@ class DOMTreeBuilder implements EventHandler { return $this->current->tagName == $tagname; } -}
\ No newline at end of file +} |