Closed
Bug 166866
Opened 22 years ago
Closed 21 years ago
HTML escape chars in textarea have confusing behavior.
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
DUPLICATE
of bug 154882
People
(Reporter: bugzilla, Assigned: harishd)
References
Details
(Keywords: compat, testcase)
Attachments
(1 file, 1 obsolete file)
1.20 KB,
text/html
|
Details |
HTML escape chars like " are usually "translated" by the browser, when
present in <textarea>. However, using today's build, if the escape-chars are in
a tag, in quotes, they are not translated.
I write an application which "double escapes" html special characters becuase of
the way most(all?) browsers handle escape chars in textarea. It makes "
into &quot; so that the browser will render it as " in the text area.
<li> will render just fine, but:
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=78676" title="[Bug 78676]
selection inside a single <li> shouldn't include bullet">Yea!</a>
will render as :
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=78676" title="[Bug 78676]
selection inside a single &lt;li&gt; shouldn't include bullet">Yea!</a>
in a textarea
![]() |
||
Comment 1•22 years ago
|
||
This is parser. Could you attach a small HTML file demonstrating the problem
using http://bugzilla.mozilla.org/attachment.cgi?bugid=166866&action=enter ?
Assignee: jkeiser → harishd
Component: HTML Form Controls → Parser
QA Contact: tpreston → moied
I guess I should also point out that when you File: Save As the attachment, the
saved source actually has &amp;lt; in it, which differs from what View
Source shows (and the way the file really is.)
Comment 4•22 years ago
|
||
Bug #167616 may be related to this issue...(?)
Comment 5•22 years ago
|
||
I'm not really sure what the correct behavior should be here; <textarea> isn't
allowed to have content other that text, and I imagine sticking that <a> element
in there is confusing the parser.
Comment 6•22 years ago
|
||
Coming back to this...yes, your problem is that you're putting "<a ..." into the
textarea, which isn't valid. Change that to "<a ..." and the parsing will
work fine. Resolving bug as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
They said the same thing about Bug 133044 at first. This is a compatibility
issue. Right or wrong, lots and lots and lots of people use <textarea> to edit
web pages and other browsers don't mangle HTML entities. Mozilla shouldn't either.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 9•22 years ago
|
||
I've noticed a similar problem using Mozilla 1.2 with Blogger
(http://www.blogger.com). When I try to edit my weblog template with Mozilla,
all of the attributes in the anchor tags are stipped out. For example:
<a href="...">foobar</a>
becomes
<a>foobar</a>
Now, if I do a viewsource on the page with the textarea, all of the data is there:
<a href="...">foobar</a>
It's just not being displayed by Mozilla.
Note that I only have this problem with that one textarea on the Blogger site.
There are other textareas on the Blogger site that don't cause any problems.
Comment 10•22 years ago
|
||
testcase showing parser is breaking on a tag opening
Attachment #98115 -
Attachment is obsolete: true
Comment 11•22 years ago
|
||
Confirming All/All off 1.3b/OS X based on my updated testcase.
The parser is indeed choking on the A tag... yes this is all invalid code... but
I think the parser should be consistant about parsing entities between the 3
textareas in the updated testcase
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Comment 12•21 years ago
|
||
*** This bug has been marked as a duplicate of 154882 ***
Status: NEW → RESOLVED
Closed: 22 years ago → 21 years ago
Resolution: --- → DUPLICATE
Comment 13•21 years ago
|
||
*** Bug 223008 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•