зеркало из https://github.com/mozilla/pjs.git
Attachment 299247 - "URL bar should ignore character directionality" [p=dao@mozilla.com (Dão Gottwald) r=gavin a=blocking-firefox3+]
This commit is contained in:
Родитель
e0a7ab0be4
Коммит
ddbe912993
|
@ -1959,6 +1959,11 @@ function URLBarSetURI(aURI) {
|
|||
encodeURIComponent);
|
||||
} catch (e) {}
|
||||
|
||||
// Encode bidirectional formatting characters.
|
||||
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||
value = value.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||
encodeURIComponent);
|
||||
|
||||
state = "valid";
|
||||
}
|
||||
}
|
||||
|
@ -3400,7 +3405,10 @@ nsBrowserStatusHandler.prototype =
|
|||
|
||||
setOverLink : function(link, b)
|
||||
{
|
||||
this.overLink = link;
|
||||
// Encode bidirectional formatting characters.
|
||||
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||
this.overLink = link.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||
encodeURIComponent);
|
||||
this.updateStatusField();
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче