зеркало из https://github.com/mozilla/pjs.git
Bug 410726 - "address bar eats escaped newlines" (keep non-space whitespace encoded) [p=zeniko@gmail.com (Simon Bünzli) r=Mano a1.9=schrep]
This commit is contained in:
Родитель
3cd40ef764
Коммит
d5973afccb
|
@ -1911,9 +1911,10 @@ function URLBarSetURI(aURI) {
|
|||
if (!content.opener)
|
||||
value = "";
|
||||
} else {
|
||||
// try to decode as UTF-8
|
||||
// try to decode as UTF-8 (escaping whitespace so that it doesn't
|
||||
// get eaten away by the location bar; cf. bug 410726)
|
||||
try {
|
||||
value = decodeURI(value).replace(/%/g, "%25");
|
||||
value = decodeURI(value).replace(/[%\r\n\t]/g, encodeURI);
|
||||
} catch(e) {}
|
||||
|
||||
state = "valid";
|
||||
|
|
Загрузка…
Ссылка в новой задаче