зеркало из https://github.com/mozilla/gecko-dev.git
Bug 202319 use s? instead of (s)? in regexp because we don't care about the s
r=biesi sr=alecf
This commit is contained in:
Родитель
5ca106ce02
Коммит
fc981ad82a
|
@ -383,8 +383,8 @@ function openLink(node)
|
|||
// Security-Critical: Only links to 'safe' protocols should be functional.
|
||||
// Specifically, javascript: and data: URLs must be made non-functional
|
||||
// here, because they will run with full privilege.
|
||||
var safeurls = /(^http(s)?:|^file:|^chrome:|^resource:|^mailbox:|^imap:|^(s)?news:|^nntp:|^about:|^mailto:|^ftp:|^gopher:)/i;
|
||||
if (url.search(safeurls) == 0) {
|
||||
var safeurls = /^https?:|^file:|^chrome:|^resource:|^mailbox:|^imap:|^s?news:|^nntp:|^about:|^mailto:|^ftp:|^gopher:/i;
|
||||
if (safeurls.test(url)) {
|
||||
var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService().
|
||||
QueryInterface(nsIScriptSecurityManager);
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче