Dumb Curly QuotesI know what you are thinking what’s wrong with quotes right? Well it depends on which kind we are talking about. I do like famous quotes. The quote of the day, and when they are used to cite an excerpt from another article. Things like that I don’t have a problem with. Many of them I actually enjoy.

What I am talking about involves the use of quotation marks used in html and other code. When I read a tutorial that says just copy this code and paste it into somewhere. Great, no problem, easy enough right. Wrong! Well usually wrong anyway.

Generally what happens, at least in a large portion of the posts I read is the quotation marks get turned into curly quotes also known as (dumb quotes / pretty quotes / fancy quotes).

So what happens is you end up copying the fancy curly quotes and pasting the code into your website and then it won’t do what it is supposed to do. You start thinking that the site doesn’t know what they are talking about. Maybe you even spend an hour or more trying to figure out why it’s not working. You end up kicking yourself if or when you realize you need to replace the curly quotes with standard quotes.

This is also why you might have heard people say don’t copy code from a word processor. Use something like notepad instead. Word processors are notorious for using curly quotes. Scripts like WordPress usually do the same thing. It does look nice when quoting text, but it creates confusion if you post html or other code that has quotation marks in it.

For example if I were to post a simple image html code it might look something like this:
<img src=”http://www.somesite.com/google.jpg” alt=”Google”>

As you can see there is a quotation mark at the beginning and end of the actual link, and in the alt part of the code around Google. They need to be regular (strait) quotes. If the website’s script turns them into the fancy curly quotes then the code isn’t going to work.

On top of that if they were automatically turned into fancy quotes even if you copy and paste the code into notepad you usually end up copying the fancy ones. You would need to manually remove (back space) them, and add regular quotes.

Sometimes they look so similar that it is easy to overlook and not even notice. I don’t always notice myself.

The reason that I am writing this is that I recently spent a lot of time working on something that I couldn’t get working at first. I had copied code from a WordPress blog without realizing I had copied curly quotes. Just when I was about to give up I figured it out.

If you ever copy code from any website you should always remove quotation marks and replace them just to make sure.

There are some things you can do in WordPress to prevent the fancy quotes from being used. You can modify your functions.php to prevent them. The drawback is it will also use standard strait quotes when you use them for quoting text. Since these actually look pretty decent I would rather not replace all of them.

There are several different ways you can go about this, but in the case of WordPress it tends to strip (remove) a lot of raw html code.

Normal Strait Quotes in WordPress Instead of Curly Quotes

The only way I have been able to post html code without it being stripped, and to actually get strait quotes instead of dumb curly quotes is to do the following:

1. Paste you html code into the normal WordPress visual editor.
2. Once you are done switch to the html editor.
3. Highlight your code and select and click on the “code” button.


Wordpress html editor


Wordpress html editor 2


It doesn’t look extremely pretty, but at least you will end up with standard strait quotes, which will be beneficial if you are posting html and other code.

It will look something like this:
<img src="http://www.somesite.com/google.jpg" alt"Google">

If WordPress didn’t automatically strip some html code there would be a number of other ways to go about this. It is possible that there is other methods, but everything else I tried got stripped.

An example of curly quotes:
” – Small
– Big

An html example with standard and curly quotes:
<img src=”http://www.somesite.com/google.jpg” alt=”Google”>
<img src="http://www.somesite.com/google.jpg" alt="Google">

*The first one has curly quotes and the second has standard strait quotes.
If you do post code for your visitors it would be a good idea to use consider this so they don’t end up with fancy, pretty, dumb, curly quotes and wonder why they can’t get it working.


About: Jeremy LeSarge - AKA: Ray (233 Posts)

I am the site owner and administrator of DialMe.com. I provide help and tips for Boonex Dolphin on the main part of this website where you will also find an assortment of other resources. Here, on the blog I write about a variety of topics surrounding WordPress, technology, social media/networking, SEO, and webmaster resources.