Closed Bug 276637 Opened 20 years ago Closed 20 years ago

Textarea tags can be left open indefinitely with <! or <!-- in content

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ben, Assigned: bastiaan)

Details

Attachments

(3 files)

[quote]
<TEXTAREA>This is some text<!--</TEXTAREA>

<BR><BR>This is some more text.
[/quote]

The second sentence will display in the textarea box, including all HTML between.

IE only escapes a <TEXTAREA> with a </textarea> from what I can tell...
commentry shouldn't escape it, I believe.
Assignee: bugs → parser
Component: View Source → HTML: Parser
Product: Firefox → Core
QA Contact: firefox.view-source → mrbkap
Version: 1.0 Branch → Trunk
Confirming and taking. I was worried about this when I wrote the function. In
fact, you *can* comment out the </textarea> in IE (I'll attach a testcase in a
bit). What's happening here is that IE is very strict about what comments it
accepts as comments in <textarea> and <title>. In quirks mode, we accept just
about anything. The easy fix is to consume comments in <textarea> and <title> in
standards mode no matter what mode the document is in.
Assignee: parser → mrbkap
Status: UNCONFIRMED → NEW
Ever confirmed: true
Note that in this testcase, our rendering matches IE's (I bet there are some
edge cases that break us even in standards mode, but I don't think I care about
those).
<mrbkap> In quirks mode, we consume too many things as comments, so we should
either modify aFlags to be in standards mode, or just pass in special flags
instead of aFlags.
Attachment #175754 - Flags: superreview?(peterv)
Attachment #175754 - Flags: review?(mrbkap)
Comment on attachment 175754 [details] [diff] [review]
don't parse comments in quirks mode

Thanks a lot! r=mrbkap
Attachment #175754 - Flags: review?(mrbkap) → review+
Attachment #175754 - Flags: superreview?(peterv) → superreview+
Assigning to Bastiaan, since this is his patch.
Assignee: mrbkap → baafie
And marking FIXED, since this was checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Textarea tags can be left open indefinately with <! or <!-- in content → Textarea tags can be left open indefinitely with <! or <!-- in content
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: