I can't really say when those fancy quotes started to appear in posts that I made on this WordPress blog, but one day they were there. I did not really put too much thought into it at that time, but when users started to comment on it, I started to take notice. You see, I sometimes post code or commands that users copy and paste into applications. Maybe a path in quotes followed by a startup parameter for Google Chrome, or a command for the Windows command line.
The problem with stylized quotes is that some programs do not see them as quotes. The consequence is dire, as the command or code is not accepted and at best not working, at worst throwing an error message or turning a working product into something that is not working at all.
The screenshot below highlights how those quotes looked like on this site.
I first browsed the style.css file of the theme I was using but could not find any reference to quotes in it. It took a while to figure out what was going on. WordPress is using a Texturize filter by default that modifies certain characters when posts are published.
The WordPress codex has a couple of examples. The two that I encountered are turning two dashes into a single dash, and turning standard quotes into stylized quotes instead. There are more however as you can see from the listing below.
"quoted text" becomes “quoted text”
'quoted text' becomes ’quoted text’
--- becomes —
-- becomes –
... becomes …
(c) becomes ©
(r) becomes ®
(tm) becomes ™
'' becomes ”
`` becomes “
president's becomes president’s
presidents' becomes presidents’
12' becomes 12′
12" becomes 12″
2x4 becomes 2×4
The feature is on by default and there is no option to turn it off in the WordPress preferences. You can however turn it off in the following way.
Open the theme folder of the WordPress installation and there the theme that you are currently using. Locate the functions.php file in there and add the following lines of code between <?php ... and ?>
This disables the Texturize filter for comments, the excerpt and the content of the blog.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.