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:
reed@reedloden.com 2008-01-19 18:58:30 -08:00
Родитель 3cd40ef764
Коммит d5973afccb
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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";