Skip to content

Commit

Permalink
Merge pull request #33 from Sidnicious/patch-1
Browse files Browse the repository at this point in the history
Don't double-encode URLs before parsing them
  • Loading branch information
b4winckler committed Sep 6, 2013
2 parents 52f4da8 + fe5039c commit 0f3e96b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/MacVim/MMAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1659,12 +1659,9 @@ - (void)handleXcodeModEvent:(NSAppleEventDescriptor *)event
- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
replyEvent:(NSAppleEventDescriptor *)reply
{
NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject]
stringValue];
// NOTE: URLWithString requires string to be percent escaped.
urlString = [urlString stringByAddingPercentEscapesUsingEncoding:
NSUTF8StringEncoding];
NSURL *url = [NSURL URLWithString:urlString];
NSURL *url = [NSURL URLWithString:[[event
paramDescriptorForKeyword:keyDirectObject]
stringValue]];

// We try to be compatible with TextMate's URL scheme here, as documented
// at http://blog.macromates.com/2007/the-textmate-url-scheme/ . Currently,
Expand Down

0 comments on commit 0f3e96b

Please sign in to comment.