Revision: 29247
http://sourceforge.net/p/bibdesk/svn/29247
Author: hofman
Date: 2025-04-30 15:31:47 +0000 (Wed, 30 Apr 2025)
Log Message:
-----------
simplify percent-escaping &
Modified Paths:
--------------
trunk/bibdesk/BDSKSRUGroupServer.m
Modified: trunk/bibdesk/BDSKSRUGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-30 15:02:32 UTC (rev 29246)
+++ trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-30 15:31:47 UTC (rev 29247)
@@ -125,10 +125,7 @@
// because wwe use POST, we only need to escape &, as that can be confused
with the separator
static NSString *escapeQueryTerm(NSString *string) {
- static NSCharacterSet *URLQueryAllowedCharacterSet = nil;
- if (URLQueryAllowedCharacterSet == nil)
- URLQueryAllowedCharacterSet = [[NSCharacterSet
characterSetWithCharactersInString:@"&"] invertedSet];
- return [string
stringByAddingPercentEncodingWithAllowedCharacters:URLQueryAllowedCharacterSet];
+ return [string stringByReplacingCharactersInSet:[NSCharacterSet
characterSetWithCharactersInString:@"&"] withString:@"%26"];
}
- (NSString *)searchQueryWithRange:(NSRange)range {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit