Closed
Bug 127043
Opened 22 years ago
Closed 22 years ago
</script> tag added to <textarea> form controls
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
People
(Reporter: mozbugs, Assigned: harishd)
References
()
Details
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.
Comment 1•22 years ago
|
||
->Parser
Assignee: asa → harishd
Component: Browser-General → Parser
QA Contact: doronr → moied
Comment 2•22 years ago
|
||
This would be because you need to escape the "<" and ">" around "script"
Whiteboard: DUPEME
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.
Also note that neither IE5 or NC4 exhibit this behaviour of modifying data that is displayed in a textarea tag.
Comment 5•22 years ago
|
||
*** This bug has been marked as a duplicate of 83221 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 6•22 years ago
|
||
Um... bug 83221 is a viewsource bug. Which this is not.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 7•22 years ago
|
||
marking duplicate of the thing it's really a duplicate of. *** This bug has been marked as a duplicate of 64799 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You need to log in
before you can comment on or make changes to this bug.
Description
•