</script> tag added to <textarea> form controls

VERIFIED DUPLICATE of bug 64799

Status

()

Core
HTML: Parser
VERIFIED DUPLICATE of bug 64799
16 years ago
16 years ago

People

(Reporter: GAThrawn, Assigned: harishd)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8+)
Gecko/20020220
BuildID:    2002022003

Mozilla adds a closing script tag to the <textarea> form control whenever a
<script> tag is started within a text area.

If you create a plain HTML page with the following source code in it:

<HTML>
  <HEAD>
    <TITLE>Untitled</TITLE>
  </HEAD>
  <BODY>

   <FORM>
    <TEXTAREA>
      <SCRIPT>
    </TEXTAREA>
   </FORM>

  </BODY>
</HTML>

(This is the exact page at http://www.jard.co.uk/net/mozformtest.html )

When this is rendered in Mozilla it will add a spurious </script> tag within the
<textarea>.



Reproducible: Always
Steps to Reproduce:
1. Visit the URL above
2. Look at text contained within the textarea

Actual Results:  The textarea contains:
<SCRIPT></script>

Expected Results:  The textarea contains:
<SCRIPT>

Originally spotted in Mozilla 0.9.8 Windows 2000, now also tested in build
2002022003 also Windows 2000.

Spotted this when testing a web application which takes the input of an HTML
form, checks the fields and if it finds any errors re-outputs the file to the
browser with the form elements pre-filled. A cut down version of this is at
http://www.jard.co.uk/cgi-bin/formtest/mozform.pl this form seemed to exhibit
the same problems as the reduced testcase using Moz 0.9.8, but using the recent
nightly I am only able to recreate the problems using the reduced test case above.
->Parser
Assignee: asa → harishd
Component: Browser-General → Parser
QA Contact: doronr → moied
This would be because you need to escape the "<" and ">" around "script"
Whiteboard: DUPEME
(Reporter)

Comment 3

16 years ago
Obviously in an ideal world everyone would escape their angle brackets. However
should Mozilla add extra phantom tags in (in a situation that could easily cause
a dataloss situation).

Also I've spotted that in the form at
http://www.jard.co.uk/cgi-bin/formtest/mozform.pl if you type the opening and
closing tags in upper case, Mozilla displays the opening (<SCRIPT>) tag in upper
case, but the closing (</SCRIPT>) tag is displayed as lower case, again changing
the form input.
(Reporter)

Comment 4

16 years ago
Also note that neither IE5 or NC4 exhibit this behaviour of modifying data that
is displayed in a textarea tag.

Comment 5

16 years ago

*** This bug has been marked as a duplicate of 83221 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
Um... bug 83221 is a viewsource bug.  Which this is not.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
marking duplicate of the thing it's really a duplicate of. 

*** This bug has been marked as a duplicate of 64799 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago16 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME

Comment 8

16 years ago
verified dup of 64799

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.