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:
timeless%mozdev.org 2006-09-14 06:08:36 +00:00
Родитель d996e90aac
Коммит 846fa86348
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -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 {