Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Bugfix: GotoAgent did not work with paths containing spaces (like "Brackets Sprint 14") #1748

Merged
merged 2 commits into from
Oct 3, 2012

Conversation

DennisKehrig
Copy link
Contributor

No description provided.

…ds to be decoded before turning it into a file system path
@ghost ghost assigned redmunds Oct 3, 2012
@@ -168,6 +168,8 @@ define(function GotoAgent(require, exports, module) {
url = _urlWithoutQueryString(url);
// Extract the path, also strip the third slash when on Windows
var path = url.slice(brackets.platform === "win" ? 8 : 7);
// URL-decode the path ('%20' => ' ')
path = decodeURIComponent(path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When decoding an entire URL, you should use decodeURI(). decodeURIComponent is used when decoding individual pieces (i.e. components) of a URI .

@DennisKehrig
Copy link
Contributor Author

Of course, that's better. He're you go!

redmunds added a commit that referenced this pull request Oct 3, 2012
Bugfix: GotoAgent did not work with paths containing spaces (like "Brackets Sprint 14")
@redmunds redmunds merged commit 943433f into adobe:master Oct 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants