File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,11 @@ - (NSString *)stringByRemovingSlashEscapes
198198
199199- (NSString *)stringByDecodingUnicodeSequences
200200{
201+
202+ if ([self rangeOfString: @" \\ " ].location == NSNotFound ) {
203+ return [self copy ];
204+ }
205+
201206 NSUInteger length = [self length ];
202207
203208 NSCharacterSet *hex = [NSCharacterSet characterSetWithCharactersInString: @" 0123456789abcdefABCDEF" ];
@@ -308,6 +313,10 @@ - (NSString *)stringByDecodingUnicodeSequences
308313
309314- (NSString *)stringByReplacingSlashEscapes
310315{
316+ if ([self rangeOfString: @" \\ " ].location == NSNotFound ) {
317+ return [self copy ];
318+ }
319+
311320 NSUInteger length = [self length ];
312321
313322 unichar *characters = calloc (length, sizeof (unichar ));
You can’t perform that action at this time.
0 commit comments