Skip to content

CodeQuote

Update: 2009-03-31: I am no longer working on this plugin. I suggest you use a different plugin for including code in your posts. Also, read Writing Code in Your Posts at the WordPress Codex.

Update 2008-01-17: I found a bug that breaks the display of code in certain situations, such that the close code tag never kicks in. Silly, I know. I’m going to work on this on Thursday afternoon.

When you enter text on a WordPress blog, quotation marks and apostrophes are displayed as smart quotes, also known as curly quotes, and sometimes as fancy quotes. But if you are including html or other programming code on your page, when someone copies and pastes the code, they end up with a mess since most programming interpreters don’t like smart quotes. CodeQuote disables smart quotes within <code> and </code> blocks.

Example (Regular Text)
Michael Clark said “Hello, World! It’s a wonderful day, isn’t it?”

Example (in a <code> block)


Michael Clark said "Hello, World! It's a wonderful day, isn't it?"

The open and close code tag must be on a line by itself!

This plugin does not modify the database or any system settings. I have tested CodeQuote only on WordPress version 2.3.2.

History

  • March 31, 2009: Plugin retired.
  • January 7, 2008: Initial release (version 0.93). I found another bug (feature!) based on a blank line on the line before the open code command.
  • January 7, 2008: Initial release (version 0.92). I think I fixed the case when you have a < inside your code block.
  • January 7, 2008: Very initial release (version 0.91). Fixed a silly typo, cleaned up logic a bit. Found a bug still working on regarding < symbols.
  • January 7, 2008: Very initial release (version 0.9).