Aug 03

WordPress is the most popular open-source blogging software in the world.  It’s powerful, mature, reliable, and best of all, free.  All of my blogs use WordPress hosted on Linux.

When you visit a WordPress blog, the WordPress software processes the blog text before displaying it on a web page.  WordPress filters out unwanted code and formats the text so the web browser can properly interpret it. 

One of the most noticeable filters is Texturize, which modifies blog text to “present a more readable and visually attractive output.”  Texturize replaces quotes with smart quotes that better show the start and end of the quote.  It also replaces sequential hyphens with dashes, and sequential periods with ellipses, etc.  For example:

Copyright © WordPress

This is a wonderful feature, except on websites like C# 411 that display a lot of source code.  C# compilers expect regular quotes, not smart quotes.  So any code copied from a WordPress blog and pasted in a development environment will generate compiler errors.  This can be frustrating to your programmer readers.

The easiest way to fix this problem is with the wpuntexturize plugin, which prevents WordPress “from displaying single and double quotation marks as their curly alternatives.”  Download, install, and activate the wpuntexturize plugin.  There is nothing to configure.  The plugin will ensure all text on your WordPress blog is displayed in a source-code-friendly manner.

This wpuntexturize plugin is important even if you use another special plugin such as SyntaxHighlighter to format the source code in your blog articles.  That’s because your readers may share source code with each other in your blog’s comments, so you need something that turns off smart quotes for your entire blog including the comments section.

If you want to go deeper, here’s an article that enables you to turn off Texturize on specific parts of your blog using PHP code.

Share and Enjoy:
  • Twitter
  • Facebook
  • Reddit
  • LinkedIn
  • Digg
  • DotNetKicks
  • StumbleUpon
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Print
  • email

Article published on August 3, 2011

Leave a Reply