"Thomas Miskiewicz" <mi*********@ya hoo.com> wrote:
Is using of a double quotation mark with a URL a problem?
I would have appreciated your telling me that you were also asking this
in public when we had our E-mail conversation. I don't particularly
fancy the task of copy & paste in vain.
http://myserver.com/query?field1=so mething&field2= test¶ms="fi eld
1=test1"+"field 2=test2"
It is not a correctly formed URL.
Here's what I E-mailed, in reply to "Can you tell me where do I find a
prove, that double quotation marks are allowed in a URL?"
You don't; they aren't.
The authoritative reference in generic URL syntax is currently RFC
2396,
which is available as hypertext at
http://www.cs.tut.fi/~jkorpela/rfc/2396/
but beware that the authoritative version is the plain text version in
official RFC repositories.
RFC 2396 explicitly declares the quotation mark as "excluded" in clause
2.4.3. Exclusion means that it may only appear in escaped form, as %22.
The reason given doesn't sound very strong:
"The angle-bracket < and > and double-quote " characters are excluded
because they are often used as the delimiters around URI in text
documents
and protocol fields."
But the statement is very clear.
And after you asked whether you should convert " to %22, I replied:
Why not? That's the right way.
Regarding "What problem can this cause?":
No idea. I would just do it the right way. Of course, if you put the
URL into an HTML document, then you surely need to consider it (but
then you should also escape the & characters). Other than that, I see
no reason why programs would fail to pass the quotation marks. But "be
liberal in what you receive, conservative in what you send".
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html