-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Incorrect processing of <script type="text/html"> #26
Comments
After a few tests, it seems that DOMDocument::loadHTML() is the root cause of this problem. Loading the test document and saving it immediately gives the following result, where
I'll investigate and get back to you if I find something interesting about that. |
After digging in StackOverflow, it seems that the only possible solution is parsing the HTML as XML, after processing self-closing tags to provide a valid XML document to the XML loader : |
fixed in version 3.1.3 |
Hello,
I often use the construct <script id="some-id" type="text/html"> some HTML code </script> to inject HTML code in the DOM. The HTML code between <script> and </script> is incorrectly processed by HtmlMin.
What is this feature about (expected vs actual behaviour)?
Source code :
Expected behaviour :
Actual behaviour :
How can I reproduce it?
Use the above source code.
Does it take minutes, hours or days to fix?
Not sure about that. Maybe minutes to ignore <script type="text/html"> content ?
Any additional information?
Thanks for your work :)
The text was updated successfully, but these errors were encountered: