[xml] DOM parser and HTML entities inside the <script> tag
- From: Raymond Irving <xwisdom gmail com>
- To: xml gnome org
- Subject: [xml] DOM parser and HTML entities inside the <script> tag
- Date: Tue, 17 Jul 2012 13:51:56 -0500
Hello,
I'm having a problem with the DOM parser:
When the following code is passed through the parser:
<script type="text/_javascript_">
var d=""Hello world;"";
</script>
it will be converted to:
<script type="text/_javascript_">
var d=""Hello world"";
</script>
This is because the parser is substituting '"' for '"'.
According to
w3.org the entities should not be replaced replaces inside CDATA sections, scripts or styles
The same thing applies to html tags inside the <script>:
<script type="text/_javascript_">
var d="<p>Jack & Jill</p>";
</script>
The "&" should not be replaced by "&"; neither should the <p> or </p> be recognized as a start or close tag
Can this issue be corrected? Is there any way to work around this?
Best regards,
__
Raymond
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]