473,581 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Double quotation mark within a URL

Hi!

Is using of a double quotation mark with a URL a problem? For example:

http://myserver.com/query?field1=so mething&field2= test&params="fi eld1=test1"+"fi eld2=test2"

Regards
Thomas
Jul 20 '05 #1
4 49512
Thomas Miskiewicz wrote:
Is using of a double quotation mark with a URL a problem?


Yes, you have to encode it as %22

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2
On Mon, 9 Feb 2004, Thomas Miskiewicz wrote:
Is using of a double quotation mark with a URL a problem? From the fact that you're asking, it seems that the answer is "yes" - what happened when you tried it?
For example:

http://myserver.com/query?field1=so mething&field2= test&params="fi eld1=test1"+"fi eld2=test2"


I'd strongly recommend you get to grips with the rules of
application/x-www-form-urlencoded - you'd be advised to mimic those
if you're trying to compose your own GET-style URLs.

Funnily enough, this is defined in the HTML specification[1] and thus
seems to be on-topic here, though I'd suspect that decoding it at the
server is more apt to be discussed on c.i.w.a.cgi (beware the
automoderation bot).

[1] http://www.w3.org/TR/html401/interac...ml#h-17.13.4.1

good luck
Jul 20 '05 #3
"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&params="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

Jul 20 '05 #4
"Thomas Miskiewicz" <mi*********@ya hoo.com> wrote in message
news:c0******** **@news.gatel.n et...
Hi!

Is using of a double quotation mark with a URL a problem? For example:

http://myserver.com/query?field1=so mething&field2= test&params="fi eld1=test1"+"fi eld2=test2"


If you have the option of using ASP, you can do this easily with the
Server.URLEncod e method. Of course, that requires some server-side
processing, but I thought I would mention it.

Regards,
Peter Foti
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3643
by: Robert Garrett | last post by:
Hi, I've created a table in SQL Server 2000 and I'm now trying to search through the data and return specific rows. I'm using this command: select * from Export where libelle_court='Recherche d'investisseurs' The problem is this: The search fails whenever there is a curly single quotation mark within the table field ( ' as opposed to '...
63
5842
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang attribute of the HTML document. Will any browsers render German-style quotes or French-style guillemots for lang="de" and lang="fr", respectively? ...
5
2494
by: Gregg | last post by:
Hello all, I have been banging my head over a problem that I am having reading a comma seperated file (CSV) that can contain from 1 to 10,000 records. My code snipit is as follows: **Start code snipit** Dim strCustFullName as string Dim strCustAddr1 as string
4
23473
by: NickName | last post by:
Hi, It seems to be simple, however, it stumbles me. how to replace all the double quotes (") within the following sentence (or a column) with single quotes ('), colA = this is a freaking "silly" thing to do into colA this is a freaking 'silly' thing to do
29
2357
by: Gregc. | last post by:
G'day I was wondering if someone can explain the concept of 'returning a Char from a Double' . For example, I have the following code: char getGrade(double mark) { if (mark>= 85) return ('A');
5
17734
by: tomcarr1 | last post by:
If I want to search for a character within a sring, I normally use x = myString.IndexOf("T") However, what if I want to look for a quotation mark within the string? I have tried x = myString.IndexOf(""") x = myString.IndexOf(")
0
1194
by: Savvas | last post by:
Hi, I have hundrends of CSV (comma delimited) files and need to check only the first column (text format) whether is correct or not. Example of incorrect column is the following: "The Product "Special Price"" I need to correct that, that is, "The Product 'Special Price'". In other words, to check the first column whether there are double...
31
4857
by: The Bicycling Guitarist | last post by:
Hi. For many years I have been using &quot; for double quotation marks in the HTML code, but the opening and closing quotation marks render the same in my browser. I'm considering going through and using &ldquo; and &rdquo; (in pairs as needed) instead. Are there any *disadvantages* to doing so, besides the time it will take to make the change?...
1
2955
by: U Aye Thein | last post by:
I found in internet how to solve single quotation mark in string and how to solve double quotation mark in string but my string may be contained single quote or double quote. How to write an expression for my string test.
0
7808
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8312
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5683
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.