> There are other ways to solve this (in my humble opinion) deficiency in at
> least early Netscape (4.03 is the latest I have or want<g>, I just use it
to
> make sure stuff works in both flavor browsers). One way is the following
> little REBOL function:
>
> cgi-escape: func [cgi][
> parse cgi [some [to " " (find replace cgi " " "%20")] to end]
> ]

Hi Ralph,

You can also use to-url to do that for you

>> d: to-url "this has spaces"
== this%20has%20spaces

d: to-url "this has spaces and (parens)"
== this%20has%20spaces%20and%20%28parens%29

It is also fairly common to escape the " " with "+" instead, because it is
shorter by 2 chars.

Check out,

http://www.rebol.org/web/url-encode.r

this does the encoding as well as the " " to "+"


Cheers,

Allen K



Reply via email to