Nothing wrong with URL encoding. http://jsfiddle.net/woomla/bQnsd/2/
encodeURIComponent doesn't seem to work (q2/q3). Just replace ';' with '%3B' seems to work (q4/q5). Op vrijdag 10 augustus 2012 16:02:32 UTC+2 schreef Nutron het volgende: > > What's so bad about URL encoding your string? > > > > On Aug 10, 2012, at 6:58 AM, woomla <[email protected] <javascript:>> > wrote: > > I understand. But now I have to escape the ';'. > > My wish is to send css formatted data in url: > http://host/?css=color:red;background-color:green;left:10;top:20 > > W. > > Op donderdag 9 augustus 2012 15:16:46 UTC+2 schreef Tim Wienk het volgende: >> >> On Thu, Aug 9, 2012 at 2:31 PM, woomla <[email protected]> wrote: >> > When i parseQueryString this string: view=a;b;c I get an array >> ['view=a', >> > 'b', 'c'] because the string is split on & AND ;. >> > >> > Is this normal behaviour? Shouldn't it only split on '&'? >> > >> > W >> >> The ideal behaviour, I guess, would be to use either '&' or ';', not >> both (currently it splits on both), and have a setting for it (an >> argument to the function perhaps, though the function already gets two >> arguments). >> >> Using ';' is not incorrect at all though: >> "We recommend that HTTP server implementors, and in particular, CGI >> implementors support the use of ';' in place of '&' to save authors >> the trouble of escaping '&' characters" >> http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2 >> >> Tim. >> >> -- >> Tim Wienk, Software Developer, MooTools Developer >> E. [email protected] | W. http://tim.wienk.name >> >
