What are Smart Quotes?
Smart Quotes are a special kind of quotation mark where the opening-quote and the closing-quote are visually different. Sometimes they are also known as “curly quotes”. In many typographic settings, this is preferred to the more mundane “straight quote”.
Notice how these quotes are slanted.
Notice how these quotes are straight.
What is the problem?
Smart quotes will break your ad tags.
An ad tag that contains accidental smart quotes will often just be blank. The good news is it’s very obvious that something is wrong. In more pernicious cases, the tag might contain a mix of smart-quotes and regular-quotes. In this situation, you may see the creative itself, but certain features may not work, such as animation, impression tracking, viewability tracking, or click tracking. This can be surprising because it looked okay.
In short, this means that the web browser does not understand your code and you need to eliminate the smart quotes to fix it. Note that smart quotes are one reason you will see this error message, but they’re not the only reason. Other syntax mistakes can cause this error too!
Where do smart quotes come from?
In the online advertising world, smart quotes can be introduced in several different ways, but three of these ways are especially common:
- Copy-pasting from a “rich” document format, such as Word, Excel, PDF or even a website
- Using the TextEdit application on OSX
- Using a CMS, such as WordPress
Yes, by default, TextEdit will automatically convert everything you paste into smart quotes – even if there were no smart quotes beforehand! WordPress can also be overly helpful sometimes, though the exact behavior depends on what theme and plugins you have installed. In the case of this blog, WordPress is automatically replacing my straight-quotes with smart-quotes (UGH!)
How can you find them?
Once you know that smart quotes are evil, there are a handful of techniques you can use to find and eliminate them.
Get a Programming Text Editor
These text editors offer powerful find-and-replace capabilities, so you can quickly replace all smart quotes with straight quotes. There are a LOT of very capable text editors out there, but here are three popular ones that you’ll be able to start using right away.
Increase Your Font Size
If you want to check quickly, you can just make the font huge. On OSX, you can press “CMD+” (command-key and plus-key) to increase the font size, and then CMD-0 (command-key and zero-key) to reset to the default.
Look for Console Errors
Friends Don’t Let Friends Use TextEdit
TextEdit is not really made for editing code. Yes, you CAN edit code, but you’ll be much, much happier using a programming text editor instead. Just try Sublime for a day and you will never want to switch back. That said, if you insist on using TextEdit, you can save yourself a little bit of pain by permanently disabling smart quotes.
- Click TextEdit
- Click Preferences
- Uncheck “Smart Quotes”
- Open a New File
The updated preference does not take effect on the currently open files, so you will need to open a new file before it starts working. Also, the Preference does not apply to copy-pasted text. So if you paste a smart quote from another document, TextEdit will keep it. Setting the Preference prevents TextEdit from adding new smart quotes, but it won’t replace existing ones.