Rebol's reading of URLs
[1/5] from: hallvard::ystad::helpinhand::com at: 23-Aug-2003 11:05
Hello list.
This irritates me:
>> http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17
== http://www.testurl.com/cgi/something.php?css=something.css&
Seems rebol's url scanner stops at semicolons. I tried url-encoding the url, but with
no more success:
>> http://www.testurl.com/cgi/something.php%3Fcss=something.css%26amp;somethingelse=17
== http://www.testurl.com/cgi/something.php?css=something.css&
Is this ment to be so? Holger?
Hallvard
[2/5] from: petr:krenzelok:trz:cz at: 23-Aug-2003 11:18
Hallvard Ystad wrote:
>Hello list.
>This irritates me:
<<quoted lines omitted: 8>>
>== http://www.testurl.com/cgi/something.php?css=something.css&
>Is this ment to be so? Holger?
Holger is not here for ages AFAIK :-)
->> to-url
http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17
==
http://www.testurl.com/cgi/something.php?css=something.css&%3Bsomethingelse=17
I think that what happened has nothing to do with non allowed chars in
url parser etc. - imo console took the text right after semicolon as a
comment ;-)
cheers,
-pekr-
[3/5] from: hallvard:ystad:helpinhand at: 23-Aug-2003 11:48
Dixit Petr Krenzelok (11.18 23.08.2003):
>I think that what happened has nothing to do with non allowed chars in
>url parser etc. - imo console took the text right after semicolon as a
>comment ;-)
Ah, very plausible! Why didn't I think about that...
But the PS example:
>> http://www.testurl.com/cgi/something.php%3Fcss=something.css%26amp%3Bsomethingelse=17
== http://www.testurl.com/cgi/something.php?css=something.css&%3Bsomethingelse=17
is still annoying. Why isn't %3B turned into a semicolon when the other two entities
transformed? Does console care for me and want me to avoid the confusion I just had?
Thanks for clearing it up, anyway.
Hallvard
[4/5] from: nitsch-lists:netcologne at: 23-Aug-2003 17:24
Hallvard Ystad wrote:
>Dixit Petr Krenzelok (11.18 23.08.2003):
>>I think that what happened has nothing to do with non allowed chars in
<<quoted lines omitted: 7>>
>== http://www.testurl.com/cgi/something.php?css=something.css&%3Bsomethingelse=17
>is still annoying. Why isn't %3B turned into a semicolon when the other two entities
transformed? Does console care for me and want me to avoid the confusion I just had?
helps
!>> to-string
http://www.testurl.com/cgi/something.php%3Fcss=something.css%26amp%3Bsomethingelse=17
==
{http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17}
?
also you could use
!>> to-url
http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17
or #[url!
http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17
]
to write such urls in code. not perfect, but..
>Thanks for clearing it up, anyway.
>
>Hallvard
>
>Prętera censeo Carthaginem esse delendam
>
-Volker
[5/5] from: brian:hawley at: 23-Aug-2003 14:19
At 11:05 AM 8/23/03 +0200, Hallvard Ystad wrote:
>Hello list.
>This irritates me:
<<quoted lines omitted: 6>>
> http://www.testurl.com/cgi/something.php%3Fcss=something.css%26amp;somethingelse=17
>== http://www.testurl.com/cgi/something.php?css=something.css&
That URL is HTML-encoded and can't be used as a URL as it is,
so why not do this:
http://www.testurl.com/cgi/something.php?css=something.css&somethingelse=17
or just treat it as a string. Semi-colons in a URL start the
cookie section (I think). Is this URL going to be displayed
in the content section of an HTML page or in an href tag?
If content, treat it as a string; if in a tag, change the
& back to & so that it will work.
Brian
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted