- --- Google Reader copy/GRController.m 2007-03-11 18:45:56.000000000 +0800
- +++ Google Reader/GRController.m 2007-03-11 18:49:46.000000000 +0800
- @@ -1610,7 +1610,15 @@
- if ([[prefs valueForKey:@"dontVerifySubscription"] boolValue] != YES) {
- - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[[NSString stringWithFormat:@"%@://www.google.com/reader/preview/*/feed/", [self getURLPrefix]] stringByAppendingString:url]]];
- + NSMutableString * escapedUrl = [NSMutableString stringWithCapacity:([url length]*3)]; // for the worst case the length will growth to 3 times
- + [escapedUrl setString:url];
- + [escapedUrl replaceOccurrencesOfString:@"?" withString:@"%3F" options:0 range:NSMakeRange(0, [escapedUrl length])];
- + [escapedUrl replaceOccurrencesOfString:@"&" withString:@"%26" options:0 range:NSMakeRange(0, [escapedUrl length])];
- + [escapedUrl replaceOccurrencesOfString:@":" withString:@"%3A" options:0 range:NSMakeRange(0, [escapedUrl length])];
- + [escapedUrl replaceOccurrencesOfString:@"/" withString:@"%2F" options:0 range:NSMakeRange(0, [escapedUrl length])];
- + [escapedUrl replaceOccurrencesOfString:@"=" withString:@"%3D" options:0 range:NSMakeRange(0, [escapedUrl length])];
- +
- + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[[NSString stringWithFormat:@"%@://www.google.com/reader/preview/*/feed/", [self getURLPrefix]] stringByAppendingString:escapedUrl]]];
- } else {
Raw Paste