Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix about:blank appearing on new tab in new windows #15194

Merged
merged 1 commit into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/lib/urlutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ const UrlUtil = {
*/
openableByContextMenu: function (url) {
if (!url) {
return false
return true
}
const protocol = urlParse(url).protocol
// file: is untrusted but handled in a separate check
Expand Down
6 changes: 3 additions & 3 deletions test/unit/lib/urlutilTestComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ module.exports = {
},
'is about:blank': (test) => {
test.equal(urlUtil().openableByContextMenu('about:blank'), true)
},
'is empty': (test) => {
test.equal(urlUtil().openableByContextMenu(), true)
}
},
'returns false when input:': {
Expand All @@ -367,9 +370,6 @@ module.exports = {
},
'is ssh:': (test) => {
test.equal(urlUtil().openableByContextMenu('ssh://[email protected]'), false)
},
'is null': (test) => {
test.equal(urlUtil().openableByContextMenu(null), false)
}
}
},
Expand Down