Closed Bug 6749 Opened 26 years ago Closed 25 years ago

CDATA blocks: end tags and <!--

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: harishd)

References

()

Details

The parser is not treating STYLE blocks as CDATA. So, for example, the following: <STYLE type="text/x-dwim-styles"> make arrow heads look like '<!--'. </STYLE> ...will turn the rest of the document into a comment, when it should not. See the test page: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/viewsource.html ...which demonstrates these problems in terms of what happens in View Source. (while we're at it, note that View Source renders the </SCRIPT> end tag as simply </>. This is probably not intentional...)
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated parser.
Severity: major → critical
Status: RESOLVED → REOPENED
Summary: STYLE blocks are CDATA! → CDATA blocks: end tags and <!--
Resolution: FIXED → ---
There are still some errors on this page. 1. The </style> and </script> tags are not respecting the original document's case (they are always lower case). 2. The comment <!-- in the third block is hiding the rest of the document! Because of error 2 above, I am increasing the severity of this bug.
Assignee: rickg → harishd
Status: REOPENED → NEW
Assigning to myself
Status: NEW → ASSIGNED
Target Milestone: M7
Parser does treat <STYLE> blocks as CDATA. It's the non-ending comment inside the <SCRIPT> block that causes the document to be hidden.
In that case, the parser is incorrectly treating CDATA. CDATA blocks should not be parsed (otherwise they would be called PCDATA blocks). The only thing that should be recognised in CDATA blocks is ETAGO, i.e.: "</". What you are calling a 'non-ending comment' should not be treated as a comment at all. See the first comment in this bug for an example of what I mean.
Since this bug has two parts, opening a new bug for the second problem.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago25 years ago
Resolution: --- → FIXED
Made </STYLE> and </SCRIPT>, etc. to represent document's case. This bug can be closed. I have opened a new bug (#7853)for the second problem mentioned. Marking the bug fixed.
Whiteboard: awaiting response from py8ieh=bugzilla@bath.ac.uk
Severity: critical → trivial
Status: RESOLVED → VERIFIED
Whiteboard: awaiting response from py8ieh=bugzilla@bath.ac.uk
Verified fixed in viewer 1999-06-14 build. Verified that the main problem is now covered by bug 7853.
You need to log in before you can comment on or make changes to this bug.