Closed
Bug 273169
Opened 20 years ago
Closed 20 years ago
<script /> in <textarea> causes </textarea> to be ignored.
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: farrier, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Despite the fact that <script></script> and <script /> tags within <textareas> are not parsed as javascript, if you have both: 1) a <script /> tag WITHIN <textarea>...</textarea> 2) a <script></script> pair AFTER the </textarea> tag, ...then the </textarea> tag will be ignored. This is experienced in Mozilla, Opera, and Firefox. This is not experienced in IE. Reproducible: Always Steps to Reproduce: 1. Create a file with the following five tags in. There can be extra code, and all opening tags can have attributes. You can add whitespace, and doctype, html, body etc tags to make the document XHTML compliant, and the bug still displays, but I'm just showing the minimum to reproduce the bug. <textarea><script /></textarea><script></script> 2. Load this file within any Gecko browser (confirmed in Mozilla/Opera/Firefox). Alternatively: 1. See http://www.dewimorgan.com/mozbug1.html in a Gecko browser. Actual Results: The textarea displays: <script /> </textarea> <script></script> Expected Results: It should just display <script /> 1) Script tags should not be parsed in any way within <textarea> tags. 2) And /> should be interpreted to close the tag anyway. So this is doubly broken.
Comment 1•20 years ago
|
||
wfm with a current cvs trunk build. Reporter: Might it be that this bug doesn't occour anymore with a current build like Mozilla 1.8a5 or a nightly build?
Comment 3•20 years ago
|
||
sounds more like parser than layout...
Assignee: nobody → parser
Component: Layout: Form Controls → HTML: Parser
QA Contact: core.layout.form-controls → mrbkap
Comment 4•20 years ago
|
||
permanent testcase pasted in URL field. WFM current trunk...will be fixed in a release [pending possible regressions] in next Mozilla Suite 1.8a release (a6) and first Firefox 1.1 alpha
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
[Though the bug is apparently resolved in the next release, I thought I'd add this extra info anyway]. This bug occurs also for the <style> tag, but no other tags that I can find are affected. I tried: <textarea><X /></textarea><X></X> ...for all X listed below. (I know that <X /> will usually be invalid, just as <script /> is invalid: however, since IMHO any contents of the <textarea> ... </textarea> should be ignored. HTML4.0 spec doesn't seem to define this, though!) I tried with the following tags, which includes, so far as I know, all valid HTML4 tags, plus some browser dependant ones: a abbr acronym address applet area b base basefont bdo big bgsound blink blockquote body br button caption center cite code col colgroup dd del dfn dir div dl dt em fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe ilayer img input ins isindex kbd label layer legend li link listing map marquee menu meta multicol noframes noscript object ol optgroup option p param plaintext pre q s samp script select small spacer span strike strong style sub sup table tbody td textarea tfoot th thead title tr tt u ul var xmp
You need to log in
before you can comment on or make changes to this bug.
Description
•