Closed
Bug 410726
Opened 17 years ago
Closed 17 years ago
address bar eats escaped newlines
Categories
(Firefox :: Address Bar, defect)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
Firefox 3 beta3
People
(Reporter: zeniko, Assigned: zeniko)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
patch
|
asaf
:
review+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
Steps to Reproduce:
1. Copy this bug's URL to the address bar and hit Enter.
Expected Results:
An alert reading "stab".
Actual result:
An alert reading "s ab" (the newline separated \ from t - now they're interpreted as a <tab>).
Depending on how bug 397815 gets fixed, this issue might get fixed as well.
Updated•17 years ago
|
Summary: address bar eats newlines → address bar eats escaped newlines
Updated•17 years ago
|
Assignee: nobody → dao
Assignee | ||
Comment 1•17 years ago
|
||
So bug 397815 didn't fix this completely...
New Steps to Reproduce:
1. Copy&paste the following into the address bar and hit Enter/Go:
> data:text/plain,Percent:%20%25%0ANewline
2. Hit Enter again
Expected Result:
Nothing happens (two lines are displayed after both steps 1 and 2).
Actual Result:
After step 2, the newline vanishes.
I guess that's because the urlbar is set to newlines="stripsurroundingwhitespace" but whitespace isn't properly escaped at
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/base/content/browser.js&rev=1.925&mark=1909,1916#1881
>- value = decodeURI(value).replace(/%/g, "%25");
>+ value = decodeURI(value).replace(/[%\r\n\t]/g, encodeURI);
would fix this issue for me.
Comment 2•17 years ago
|
||
(In reply to comment #1)
> >- value = decodeURI(value).replace(/%/g, "%25");
> >+ value = decodeURI(value).replace(/[%\r\n\t]/g, encodeURI);
>
> would fix this issue for me.
I think this makes sense. Would you like to take the bug?
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M11
Assignee | ||
Comment 4•17 years ago
|
||
See comment #4 for why we need to keep newlines and tabs encoded as well.
Assignee | ||
Comment 5•17 years ago
|
||
Comment 6•17 years ago
|
||
Comment on attachment 296754 [details] [diff] [review]
keep non-space whitespace encoded
r=mano
Attachment #296754 -
Flags: review?(mano) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #296754 -
Flags: approval1.9?
Comment 7•17 years ago
|
||
Why not just use \s?
Updated•17 years ago
|
Attachment #296754 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #7)
Because we explicitly don't want to have %20 for plain spaces. At least that's how I understand the intention of these decoding bits.
Keywords: checkin-needed
Comment 9•17 years ago
|
||
Checking in browser/base/content/browser.js;
/cvsroot/mozilla/browser/base/content/browser.js,v <-- browser.js
new revision: 1.928; previous revision: 1.927
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•