-
Notifications
You must be signed in to change notification settings - Fork 118
image within inline svg breaks system #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does it mean that when we are in SVG mode, |
@jschoder See 4b75717 that tries to reproduce the case you said, and as you can see on travis (https://travis-ci.org/Masterminds/html5-php/builds/230278543) the build is green |
|
@MichaelHeerklotz and @jschoder can you point me to the docs where is specified that I've used the https://validator.w3.org/nu/#textarea validator, and the following document looks to be valid: <!DOCTYPE html>
<html>
<head>
<title>foo</title>
</head>
<body>
<svg>
<image height="10" width="10"/>
</svg>
</body>
</html> Closing the issue because of it. Feel free to comment, and if the issue looks still there, will re-open it. |
html5-php: No errors
html5-php: Line 0, Col 0: Could not find closing tag for image
html5-php: Line 0, Col 0: Could not find closing tag for image |
@MichaelHeerklotz which version are you using? see Line 32 in 0a00d47
|
@goetas latest branch 2.x from today. I check the errors with:
|
fixed with #133 |
The current version 2.7.5 still returns svg as text node: <ul id="nav1" class="nav1main">
<li>
<a href="/" class="logo-image">
<svg id="logo-mobile">
<image href="logo-mobile.svg" width="100%" height="100%" />
</svg>
</a>
</li>
</ul> Source: <ul id="nav1" class="nav1main">
<li>
<a href="/" class="logo-image">
<svg id="logo-mobile">
<image href="logo-mobile.svg" width="100%" height="100%"></image>
</svg>
</a>
</li>
</ul> Equal, if image with separate closing tag or self-closing. |
I have a website with inline SVGs, some of them include a image-tag, which isn't an empty tag but a separate open and close tag. Your function Parser/DOMTreeBuilder.startTag just overrides image with img which doesn't allow a separate closing tag and therefore fails.
I totally get why img is identical to image in normal html. But the replacement shouldn't happen when the tag is inside an inline svg. For now I "fixed" the issue by uncommenting the image-img-replacement.
The text was updated successfully, but these errors were encountered: