>
> 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
>

You got me on the right track, Allen (thanks!) but it was a bit trickier
than just using to-url.... If I tried to print the translated URL (as I do
in looping through and constructing secure URLs for books that can be
ordered) I lost the escapes. Finally it occurred to me (slowly but surely)
to just PROBE the little mudpuppies! That works and keeps the format.

For any of those interested, you can see all this in action at
http://abooks.com. Click on any book title; either the random ones or
through either of the searches available.

And, as a bonus, here's the code of how I do it... enjoy:

;;;;;;;;;;;; escape for Netscape ;;;;;;;;;;;;;;;;;;;


                print {<a href="}
                order: join "https://abooks.safeserver.com/cgi-bin/bookord.r?title=" 
title
                order: join order {&author=}
                order: join order trim author
                order: join order {&isbn=}
                order: join order trim isbn
                order: join order {&pub=}
                order: join order trim pub
                order: join order {&price=}
                order: join order trim price
                order: make url! order
                probe order
                print {">}
                print trim title
                print "</a>"


--Ralph Roberts


Reply via email to