Closed Bug 227050 Opened 21 years ago Closed 20 years ago

textarea fails to display content with a dot inside string like xml element end tag

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 64799

People

(Reporter: sylvain.cote, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 When a textarea section already has content defined by the HTML code and this content contains a string like an HTML/XML end tag with a dot inside the element name: Mozilla fails to display the second part (including the dot) and by consequence the textarea initial value is set to something wrong. ex: (inside <form><textarea> zone) "<part1.part2>" displays "&lt;part1.part2&gt;" but: "</part1.part2>" displays "&lt;/part1&gt;" instead of "&lt;/part1.part2&gt;" Reproducible: Always Steps to Reproduce: 1. load this code "<html><body><form><textarea></part1.part2></textarea></form></body></html>" 2. 3. Actual Results: displays a textarea with </part1> as pre-defined content Expected Results: should display a textarea with </part1.part2> as pre-defined content Same behaviour with mozilla 1.4
HTML should be encoded withhin <textarea/> if you want to display it properly. This is probably a dupe of bug 64799 or bug 154882. I am quite certain I saw this one before.
I've just try within "<textarea/>" but get the same results (note that I'm not sure I use this right, first time I hear about) a way to get mozilla display the expected result would be to use &lt; instead of '<' like discussed with other bugs related to textarea (including those you quote) Ive seen around that we should do that systematically inside texteara, well if that's the case mozilla should then failed with <ok> at the first place, since I guess it's a real problem that it displays some correctly and fails to a limited set of other (I understand it can't display "</textarea>" though ;-) ) I've submitted this one because none of those I found were related precisely to this sequence "</part1.part2>" (dot within an element end), quite simple to reproduce.
I'll try to explain. The contents of textarea are the same as those of any other element in HTML. Since you can't use custom things in other tag of HTML: - <title>blah > blah</title> is invalid - <title>blah &gt; blah</title> is correct And since a lot of people are not aware of this (lot of people write: <a href="page.ext?p=q&c"/>, which should be: <a href="page.ext?p=q&amp;c"/>) Mozilla tries to support this, like other browsers. But if you want to solve this problem you have right away, you are doing the best with encoding all these entities, like I have shown in the examples. If you do so, it is guaranteed that it works in really old and the newest browsers.
This was fixed by bug 64799. Duping. *** This bug has been marked as a duplicate of 64799 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.