Closed
Bug 226099
Opened 21 years ago
Closed 20 years ago
[RFE] Highlight "<![CDATA[" and matching "]]>" in View Source
Categories
(Core :: DOM: HTML Parser, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: levertond, Assigned: mrbkap)
References
Details
Attachments
(3 files)
413 bytes,
application/xhtml+xml
|
Details | |
11.91 KB,
image/gif
|
Details | |
1.62 KB,
patch
|
bzbarsky
:
review+
rbs
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 The opening and closing markup of a CDATA section should be highlighted in the View Source window. Reproducible: Always Steps to Reproduce: 1. Open XML/XHTML page containing a CDATA section. 2. View the source. Actual Results: Source window opens, with the "<![CDATA[" and "]]>" markup in the same colour as regular text, making it harder to distinguish. Expected Results: "<![CDATA[" and "]]>" should be highlighted.
Comment 1•21 years ago
|
||
Can You give an example? I see CDATA in different color than normal text.
Reporter | ||
Comment 2•21 years ago
|
||
Reporter | ||
Comment 3•21 years ago
|
||
Comment 4•21 years ago
|
||
Dup of the general "XML view source uses the HTML tokenizer" stuff. The problem is that the content of <script> tags is not tokenized as CDATA by the HTML tokenizer. Regular CDATA sections are.
Whiteboard: DUPEME
Comment 5•21 years ago
|
||
*** This bug has been marked as a duplicate of 91240 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Comment 6•20 years ago
|
||
Reopening, since we've decided there is no reasonable way to use the expat tokenizer, so we'll fix the XML bugs one at a time.
Assignee | ||
Comment 7•20 years ago
|
||
bz, I'm not sure how possible this is. We could ignore <script> and <style> when processing XML in the tokenzier (i.e., treat them as any other tags, as happens in XML), but this sort of change scares me. Maybe restricting the behavior to view-source + XML would be better. Otherwise, this should be WONTFIX.
Comment 8•20 years ago
|
||
Blake, the only time XML should be going through the HTML tokenizer is for view source. So you could just treat them normally for XML and assert that we're in view source, I think.
Assignee | ||
Comment 9•20 years ago
|
||
Confirming, taking and moving to Parser (as that is where the changes are going to have to take place).
Assignee: doronr → mrbkap
Status: UNCONFIRMED → NEW
Component: ViewSource → HTML: Parser
Ever confirmed: true
Assignee | ||
Comment 10•20 years ago
|
||
While technically this doesn't fill the RFE (to only highlight the <![CDATA[ and the ]]>), this is as close as we're going to get until marked sections are parsed properly.
Assignee | ||
Updated•20 years ago
|
Attachment #161725 -
Flags: review?(bzbarsky)
Comment 11•20 years ago
|
||
Comment on attachment 161725 [details] [diff] [review] patch v1 r=bzbarsky assuming you've tested the effect this has on <script>, <style>, <textarea> in XML documents...
Attachment #161725 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•20 years ago
|
||
Comment on attachment 161725 [details] [diff] [review] patch v1 bz: I've just tested that they all still work. Of course, if this patch had broken XML documents, something would have been seriously wrong (and the assert would have told me). rbs, could you sr?
Attachment #161725 -
Flags: superreview?(rbs)
Comment 13•20 years ago
|
||
I meant on view-source of XML documents. I agree that this should not affect actual XML rendering in any way. ;)
Comment 14•20 years ago
|
||
Comment on attachment 161725 [details] [diff] [review] patch v1 sr=rbs
Attachment #161725 -
Flags: superreview?(rbs) → superreview+
Assignee | ||
Comment 15•20 years ago
|
||
Marking fixed as timeless checked this in.
Status: NEW → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•