Closed Bug 149867 Opened 22 years ago Closed 20 years ago

Whitespace reversal on name and value attributes of <param> element?

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 154120

People

(Reporter: hamilton.moz, Assigned: harishd)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Browser version: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530. Web Server: Tomcat 3.2.4 (Tru64) URL Content: JSP Page (Intranet site) From a HTML page that includes an embeded Java Applet this is what I see in the the view source window. The Applet (when it did work) also fell over on a substring because of the extra whitespace. The problem is that the extra whitespace before the value in the double-quotes on the NAME and VALUE attributes is not supposed to be there!! <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="250" height="200" codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab\#Version\=1,3,1,0"> <param NAME="type" VALUE="application/x-java-applet;jpi-version\=1.3.1"> <param NAME =" CODE" VALUE =" login.DPSLogin"> <param NAME =" NAME" VALUE =" DPSLogin"> <param NAME =" CODEBASE" VALUE =" ."> <param NAME =" BgColor" VALUE =" b4b4b4"> <param NAME =" FgColor" VALUE =" 404040"> <param NAME =" BgColorLabels" VALUE =" b4b4b4"> <param NAME =" FgColorLabels" VALUE =" 404040"> <param NAME =" BgColorTitle" VALUE =" b4b4b4"> <param NAME =" FgColorTitle" VALUE =" ff0000"> <param NAME =" BgColorButtons" VALUE =" b4b4b4"> <param NAME =" FgColorButtons" VALUE =" 404040"> <param NAME =" TITLE" VALUE =" DPS v1.2 Login"> <param NAME =" TitleSize" VALUE =" 24"> <param NAME =" TitleStyle" VALUE =" Monotype Corsiva"> <param NAME =" Domains" VALUE =" CENTRAL,CENTRALLAB,CORPORATE_SERV,DEVELOPMENT,FRANKS_TEST,HUNTER,IDM,ILLAWARRA,IS-MAIL,NEIT_ADMIN,NEW_ENGLAND,NORTHERN_SYDNEY,NORTH_COAST,NOVELL,NSI,OTEN,PINRESD,RIVERINA,SOUTHERN_SYDNEY,SOUTH_WESTERN,SYDNEY,WESTERN,WESTERN_SYDNEY,"> <param NAME =" scriptable" VALUE =" true"> <param NAME =" cache_option" VALUE =" no"> <param NAME =" cache_archive" VALUE =" "> <param NAME =" MAYSCRIPT" VALUE =" true"> <COMMENT> <embed type="application/x-java-applet;jpi-version=1.3.1" width="250" height="200" align="baseline" code="login.DPSLogin.class" BgColor =" b4b4b4" FgColor =" 404040" BgColorTitle =" b4b4b4" FgColorTitle =" ff0000" TITLE =" DPS v1.2 Login" TitleSize =" 24" TitleStyle =" Monotype Corsiva" MAYSCRIPT = true pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html"> <noembed> </COMMENT> <br>No JDK 1.3.1 support for APPLET!! </noembed></embed></object> Now this is what I see if I fake up a HTTP request using Telnet <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="250" height= "200" codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab\#Ver sion\=1,3,1,0"> <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version\=1.3.1"> <PARAM NAME = "CODE" VALUE = "login.DPSLogin"> <PARAM NAME = "NAME" VALUE = "DPSLogin"> <PARAM NAME = "CODEBASE" VALUE = "."> <PARAM NAME = "BgColor" VALUE = "b4b4b4"> <PARAM NAME = "FgColor" VALUE = "404040"> <PARAM NAME = "BgColorLabels" VALUE = "b4b4b4"> <PARAM NAME = "FgColorLabels" VALUE = "404040"> <PARAM NAME = "BgColorTitle" VALUE = "b4b4b4"> <PARAM NAME = "FgColorTitle" VALUE = "ff0000"> <PARAM NAME = "BgColorButtons" VALUE = "b4b4b4"> <PARAM NAME = "FgColorButtons" VALUE = "404040"> <PARAM NAME = "TITLE" VALUE = " DPS v1.2 Login"> <PARAM NAME = "TitleSize" VALUE = "24"> <PARAM NAME = "TitleStyle" VALUE = "Monotype Corsiva"> <PARAM NAME = "Domains" VALUE = "CENTRAL,CENTRALLAB,CORPORATE_SERV,DEVELOPMENT,F RANKS_TEST,HUNTER,IDM,ILLAWARRA,IS-MAIL,NEIT_ADMIN,NEW_ENGLAND,NORTHERN_SYDNEY,N ORTH_COAST,NOVELL,NSI,OTEN,PINRESD,RIVERINA,SOUTHERN_SYDNEY,SOUTH_WESTERN,SYDNEY ,WESTERN,WESTERN_SYDNEY,"> <PARAM NAME = "scriptable" VALUE = "true"> <PARAM NAME = "cache_option" VALUE = "no"> <PARAM NAME = "cache_archive" VALUE = ""> <PARAM NAME = "MAYSCRIPT" VALUE = "true"> <COMMENT> <EMBED type="application/x-java-applet;jpi-version=1.3.1" width="250" height="20 0" align="baseline" code="login.DPSLogin.class" BgColor = "b4b4b4" FgColor = "404040" BgColorTitle = "b4b4b4" FgColorTitle = "ff0000" TITLE = " DPS v1.2 Login" TitleSize = "24" TitleStyle = "Monotype Corsiva" MAYSCRIPT = true pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html"> <NOEMBED> </COMMENT> <br>No JDK 1.3.1 support for APPLET!! </NOEMBED></EMBED></OBJECT> As you can see if one does anything with that value in the Applet it would have unexpected results. I've also tried this on Window 2000 (just to be sure..) Many thanx
To test that we need to know which pages you are saying is read in error. Please provide testcase. Over to parser. pi
Assignee: attinasi → harishd
Component: Layout → Parser
QA Contact: petersen → moied
Here's the simple version: This-- <HTML> <HEAD><TITLE>Test</TITLE> </HEAD> <BODY> <FORM METHOD = "post"> No whitespace <INPUT TYPE="text" NAME="text1" VALUE=""> With whitespace <INPUT TYPE = "text" NAME = "test2" VALUE = ""> </FORM> </BODY> </HTML> Turns into this-- <html> <head><title>Test</title> </head> <body> <form METHOD =" post"> No whitespace <input TYPE="text" NAME="text1" VALUE=""> With whitespace <input TYPE =" text" NAME =" test2" VALUE =" "> </form> </body> </html> Note that when the the style of TAG[space]=[space]"text" is used, the second space gets swapped with the quote. (I.e. TAG[space]="[space]text") If the extra whitespace is removed, then the problem does not occur.
Attached file testcase (deleted) —
CONFIRM on 2002072304 WinXP For ease of use, I made a testcase with the code posted above. What bothers me is if whitespace is allowed at that location. For some reason I think it isn't, but I can't find any proof of that. Anyone?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/2002090311 I understand and can reproduce it. Looks like bug 57724. pi
Blocks: 57724
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
Except this is a problem in non-view-source mode too, no?
How do you see it in "non-view-source mode"? I would expect a blank in the second field which is not there. pi
Keywords: testcase
Summary: whitespace reversal on name and value attributes of param elemet? → Whitespace reversal on name and value attributes of <param> element?
I don't think that this can show up in non-viewsource mode. I think that this is simply a problem with the placement of the " in view source, not with how we actually parse the attributes.
This bug is confirmed existence in the following release and builds; - Mozilla Firefox 0.8 - Mozilla Firefox 0.8.0+ Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040228 - Mozilla browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:) Gecko/20040301 Neither when using with Windows XP (Professional SP1) I think that the cause is in parser used with view-sourece. If you assume the following to be [test.htm] and view-source, you can confirm the bug. However, when you assume it to be [test.txt], you cannot confirm the bug in viewsorce. [test.htm/test.txt] <test = "123">TEST</test> Moreover, if three blank-spaces are inserted behind the equal sign, you will be able to see the following source display. [view-source test.htm] <test =" 123">TEST</test> The blank-spaces ahead of the equal sign seems not to influence (It is normally displayed). And this case doesn't have the influence in Save-Page-As at all.
Marking dup of bug with clearer problem explanation. *** This bug has been marked as a duplicate of 154120 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: