Closed papandreou closed 10 years ago
Hi!
When a <script> contains something that looks like markup as the first token, the < is not included in element.raw and element.data. This causes problems when parsing templates that use the type='text/html' hack, for example:
<script>
<
element.raw
element.data
type='text/html'
<html> <body> <script type='text/html'><div></div></script> </body> </html>
... which makes the Text element come out as div></div>.
Text
div></div>
The above is also included as a test case.
I ran into this issue with jsdom, which still uses htmlparser 1.x.
@tautologistics: Any chance of getting this merged?
Never mind, all the software I care about is using other parsers by now.
Hi!
When a
<script>
contains something that looks like markup as the first token, the<
is not included inelement.raw
andelement.data
. This causes problems when parsing templates that use thetype='text/html'
hack, for example:... which makes the
Text
element come out asdiv></div>
.The above is also included as a test case.
I ran into this issue with jsdom, which still uses htmlparser 1.x.