mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
URI encode parameter values
Previously the path to open would not open properly if it contained a '&' character since the character was not encoded and would cause the parameter parsing to stop at the first '&'.
This commit is contained in:
@@ -12,8 +12,10 @@ class AtomWindow
|
||||
@browserWindow = new BrowserWindow show: false, title: 'Atom'
|
||||
@handleEvents()
|
||||
|
||||
url = "file://#{resourcePath}/static/index.html#bootstrapScript=#{bootstrapScript}&resourcePath=#{resourcePath}"
|
||||
url += "&pathToOpen=#{@pathToOpen}" if @pathToOpen
|
||||
url = "file://#{resourcePath}/static/index.html#"
|
||||
url += "bootstrapScript=#{encodeURIComponent(bootstrapScript)}"
|
||||
url += "&resourcePath=#{encodeURIComponent(resourcePath)}"
|
||||
url += "&pathToOpen=#{encodeURIComponent(@pathToOpen)}" if @pathToOpen
|
||||
url += '&exitWhenDone=1' if exitWhenDone
|
||||
|
||||
@browserWindow.loadUrl url
|
||||
|
||||
Reference in New Issue
Block a user