Closed Bug 122119 Opened 23 years ago Closed 22 years ago

cannot use consecutive space characters in applet parameters

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: cspeter, Assigned: peterl-bugs)

References

()

Details

(Keywords: testcase, Whiteboard: [ADT2 RTM][PL RTM])

Attachments

(1 file, 1 obsolete file)

Consecutive space characters in applet parameters are converted to only one
space. Example:
<applet NAME="x" VALUE="'  '">   (two spaces between quotes)
The value returned by getParameter("x") is "' '" (only one space between quotes)
related: bug 50348
Over to harish. Harish, can you help me find a good home for this? I'm not sure
who should get this, parser, DOM? This could affect major sites that are doing
tickers and whatnot. 
Assignee: asa → harishd
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is certainly not a parser problem because parser does not compress
attribute values. AFAIK, this is a layout issue
Assignee: harishd → attinasi
Component: Browser-General → Layout
QA Contact: doronr → petersen
Maybe caused by CompressWhitespace() at:
http://lxr.mozilla.org/mozilla/source/layout/html/base/src/nsObjectFrame.cpp#3007

Should this be changed to something like:
Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE);
Assignee: attinasi → peterl
Changing Priority to P2.
Priority: -- → P2
Keywords: testcase
More than 4 months passed. Mozilla 1.0 has been released. Nothing changed. It  seems that you officially promoted this bug to feature. Will Netscape 7.0 have  this new feature too?  
Severity: major → blocker
Peterl, yeah, looks like your suggestion should fix this, how about getting this
checked in soon? If you land this on the trunk then maybe you could get this in
for Netscape 7.0 too?
Attached patch possible patch? (obsolete) — Splinter Review
This patch changes |CompressWhitespace| into |Trim|. We now match IE and the
testcase passes. Please review.
Keywords: patch, review
Comment on attachment 87098 [details] [diff] [review]
possible patch?

sr=jst. This looks very correct to me, the old code definately wasn't doing
what was expected, I think we should get this in for MachV.
Attachment #87098 - Flags: superreview+
Nominating and setting milestone (please reset if you disagree).
Keywords: mozilla1.0, nsbeta1
Target Milestone: --- → mozilla1.0.1
Whiteboard: [PL RTM]
Comment on attachment 87098 [details] [diff] [review]
possible patch?


>-     name.CompressWhitespace();  // XXX right function?
>-     value.CompressWhitespace();
>+     name.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE);
>+     value.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE);

Can you order this differently? That is replace \b\t\r\n with \n\r\t\b.
Also, what about leading/trailing space characters?
>Also, what about leading/trailing space characters? 
Doh! didn't notice the space. Ignore this comment.

Anyway, the ordering should be " \n\r\t\b".
Attachment #87098 - Attachment is obsolete: true
Comment on attachment 87114 [details] [diff] [review]
patch flipping order of whitespace chars

r=harishd
Attachment #87114 - Flags: review+
Attachment #87114 - Flags: superreview+
Comment on attachment 87114 [details] [diff] [review]
patch flipping order of whitespace chars

sr=jst
Severity: blocker → normal
Status: NEW → ASSIGNED
Keywords: reviewapproval
patch in trunk (after 1.1 alpha), marking FIXED and nominating for 1.0 branch
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Keywords: adt1.0.0adt1.0.1
Do we have examples on any major site where this is a problem?
http://www.jchem.com/example/index.jsp
http://www.chemaxon.com/marvin/doc/example-sketch3.2.html
and there are a lot more pages that may also show the bug on other sites that
use our applets
And besides, any major site out there can write an applet tag with param
elements in it that end up not working becase of this bug any time in the
future. This patch is as safe as they come, I see no reason not to take this on
the branch.
This is a very important fix, preserving whitespace within attributes is a high
profile issue especially in regards to HTML complinace. The whitespace can have
significant meaning to a web author. This may seem minor to someone reviewing
this, but it is indeed worth the approval.

As Jonny stated, this a a very low-risk fix
Shrir, can you verify this fix and update the bug. thx.
Keywords: verifyme
Blocks: 143047
Whiteboard: [PL RTM] → [PL RTM] [Need Impact] [ETA Needed]
testcase works now. I see two spaces just fine. Repoerter, pls check other tests 
that uhave. Thnx! verif on trnk0621 nt
The latest build works also with other test pages. Thanks!
this should have been marked as nsbeta1+ already
Keywords: nsbeta1nsbeta1+
Whiteboard: [PL RTM] [Need Impact] [ETA Needed] → [PL RTM] [ADT2] [ETA Needed]
Whiteboard: [PL RTM] [ADT2] [ETA Needed] → [PL RTM] [ADT2] [needs drivers, ADT approval]
Resolving as verified per Comment #22 From shrirang khanzode.
Status: RESOLVED → VERIFIED
Whiteboard: [PL RTM] [ADT2] [needs drivers, ADT approval] → [ADT2 RTM] [needs drivers, ADT approval][PL RTM] [ETA 06/25]
Comment on attachment 87114 [details] [diff] [review]
patch flipping order of whitespace chars

Please land this on the 1.0.1 branch.  Once there, replace the
"mozilla1.0.1+" keyword with the "fixed1.0.1" keyword.
Attachment #87114 - Flags: approval+
adding adt1.0.1+.  Please land this by the end of 6/24 on the branch.
Keywords: adt1.0.1adt1.0.1+
Keywords: approval, verifyme
Whiteboard: [ADT2 RTM] [needs drivers, ADT approval][PL RTM] [ETA 06/25] → [ADT2 RTM][PL RTM] [ETA 06/25]
landed on 1.0.1 branch
Whiteboard: [ADT2 RTM][PL RTM] [ETA 06/25] → [ADT2 RTM][PL RTM]
Verified in the branch OS X (2002-07-16-05) and Windows ME (2002-07-16-08)
Keywords: verified1.0.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: