Fixing WP-Syntax

Posted in The Internet by Dan on January 26th, 2009

WordPress is great. In some ways. Sometimes. It has all these plugins that add all kinds of neat features. It even has a really easy-to-use auto-update feature for plugins. So when I saw that a new version of Ryan McGeary’s very useful WP-Syntax plugin was available, I let it do the upgrade for me.

Unfortunately, this made a mess of my previous post (thanks to David for pointing this out to me – I wasn’t actually diligent enough to check for myself that the upgrade hadn’t broken anything). All the < and > characters in my Java code had been replaced by HTML entities (&gt; and &lt;). Rolling back to WP-Syntax 0.9.1 didn’t fix the problem, which was odd. Then a few neurons flickered into life and I had a vague recollection of having solved this problem previously. It turns out that I had modified the PHP source for the WP-Syntax plugin (as described here). I simply had to make the same change for the new version.  I’m ignorant as to why WP-Syntax does not include this modification by default. Maybe it breaks something else, but it works for me.