473,735 Members | 6,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Double quotation mark within a URL


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"

Jul 20 '05 #1
4 49562
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-

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
which is available as hypertext at
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
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...

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.

Peter Foti
Jul 20 '05 #5

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

Similar topics

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 ' ). For example, if the field entry in my table is this:
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? Regards, Tristan
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
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
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');
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(")
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 quotation marks within the whole string. If there are any replace them with single quotation marks...
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? Thanks.
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.
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.