Bug 1402896 - make the url bar strip javascript even when preceded by control characters, r=mak
MozReview-Commit-ID: 5ZO8n5lfvnl
This commit is contained in:
@@ -6126,7 +6126,7 @@ function stripUnsafeProtocolOnPaste(pasteData) {
|
||||
// LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for those.
|
||||
let changed = false;
|
||||
let pasteDataNoJS = pasteData.replace(/\r?\n/g, "")
|
||||
.replace(/^(?:\s*javascript:)+/i,
|
||||
.replace(/^(?:\W*javascript:)+/i,
|
||||
() => {
|
||||
changed = true;
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user