Re: Parameter strings in URLs
Re: Parameter strings in URLs
- Subject: Re: Parameter strings in URLs
- From: Kay Roepke <email@hidden>
- Date: Mon, 8 Mar 2004 02:42:32 +0100
On 7. Mrz 2004, at 20:17 Uhr, Ken Tozier wrote:
My best interpretation of the RFC 1808 spec would yield something like:
<a href="http://bla/bla/bla;key1="bobo";key2="ned";key3="gwen"?<some
query here>>
NSString *parameter1, *parameter2, *invalidURL, *validURL;
invalidURL =
@"
http://bla/bla/bla;key1=\"bobo\";key2=\"ned\";key3=\"gwen\"?
whatever=1";
validURL =
@"
http://bla/bla/bla;key=bobo;key2=ned;key3=gwen?whatever=1";
parameter1 = [[NSURL URLWithString: invalidURL] parameterString];
parameter2 = [[NSURL URLWithString: validURL] parameterString];
NSLog(@"invalid: %@\nvalid: %@", parameter1, parameter2);
which yields:
invalid: (null)
valid: key=bobo;key2=ned;key3=gwen
So no quotes inside parameter strings, as seen in RFC 1808 (quotes are
not in the allowed characterset).
If you need quotes you must escape them! (Using the escape rule as
described in RFC 1808).
Kay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.