-
Notifications
You must be signed in to change notification settings - Fork 975
do not generally allow file:// to be opened in new tab #14973
Conversation
fix #14522 Test Plan: 1. create an HTML file called 'file-load.html' somewhere on your computer 2. go to https://jsfiddle.net/L9t0je3h/3/ and replace 'file:///Users/yan/Downloads/file-load.html' with the path of this file 3. in the jsfiddle page, right click on the link that says 'right click to open in new tab' and try clicking any of the context menu items to open in a new tab/window. they should all load about:blank instead of the real file. 4. go to Menu > File > Open files. pick some files to open and make sure these open correctly.
|
@jumde good catch. can we merge this and then do a lower-priority fix for opening file from file via context menu? (i think file should still be openable from context-menu via cmd+click) |
*/ | ||
createTabRequested: function (createProperties, activateIfOpen = false, isRestore = false, focusWindow = false) { | ||
createTabRequested: function (createProperties, activateIfOpen = false, isRestore = false, focusWindow = false, allowFile = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style comment (not blocking by any means 😛 I know it was already like this) - when functions start to have this many params, it might be better to accept a map with named params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test plan works - code changes look good (one note left about style, but fixing is optional IMO). Functionality is also covered by test 👍
Follow up issue: #15006 |
do not generally allow file:// to be opened in new tab
do not generally allow file:// to be opened in new tab
Could you close the report on H1, please? @diracdeltas |
fix #14522
Test Plan:
computer
'file:///Users/yan/Downloads/file-load.html' with the path of this
file
to open in new tab' and try clicking any of the context menu items to
open in a new tab/window. they should all load about:blank instead of
the real file.
these open correctly.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests