New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak how empty URLs are resolved #7146

Merged
merged 7 commits into from Sep 9, 2016

Conversation

Projects
None yet
2 participants
@kevinsawicki
Contributor

kevinsawicki commented Sep 9, 2016

This pull request changes how the URLs passed to window.open, the <webview> src attribute, and the <webview> preload attribute are resolved.

window.open with either a null URL or an empty string URL now opens about:blank. Previously it would resolve null agains the current path and open something like file:///foo/bar/null and empty string would open the current page. Opening about:blank instead seems to be more consistent with the Chrome behavior and the window.open docs.

Empty string src and preload attributes are now ignored instead of resolved to the current page's URL. This prevents accidentally loading the current HTML page as a preload script or accidentally loading the current page into the <webview>.

Closes #7035

@kevinsawicki kevinsawicki changed the title from Tweak how empty URLs are handled to Tweak how empty URLs are resolved Sep 9, 2016

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Sep 9, 2016

👍

@zcbenz zcbenz merged commit 693ba13 into master Sep 9, 2016

8 of 9 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
electron-linux-arm Build #4078991 succeeded in 53s
Details
electron-linux-ia32 Build #4078992 succeeded in 48s
Details
electron-linux-x64 Build #4078993 succeeded in 85s
Details
electron-mas-x64 Build #2338 succeeded in 7 min 21 sec
Details
electron-osx-x64 Build #2346 succeeded in 7 min 39 sec
Details
electron-win-ia32 Build #1414 succeeded in 6 min 30 sec
Details
electron-win-x64 Build #1391 succeeded in 6 min 20 sec
Details

@zcbenz zcbenz deleted the resolve-empty-url-values branch Sep 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment