Posts Tagged ‘wordpress’

XHTML fixes for the WordPress reCAPTCHA plugin

Friday, July 30th, 2010

The wp-recaptcha plugin for WordPress breaks when you’re serving pages as application/xhtml+xml. I inadvertently broke comments when I installed it (silly me for not testing!). I’ve written a patch that fixes it.

The default javascript API uses document.write, which isn’t a DOM method and hence is not a method of true XML documents. It’s not a new issue either, wp-recaptcha has had a history of breaking XHTML. The thing is, the WordPress plugin (which uses the PHP library by the recaptcha people) has an option to “Be XHTML 1.0 Strict compliant”; but this only fixes the use of iframes and noscript!

Updated: pushed fork to github
(more…)

reStructuredText for WordPress

Monday, February 4th, 2008

I’ve previously mentioned how Matthew Scott’s reStructuredText for WordPress is a good hack for making wordpress usable. However, revision 5 from the rest-wordpress bazaar repository was broken in a few ways.

The most annoying way was that the options I’d configured up the top of the file weren’t having the desired effect. I wasted the better part of an hour in debugging until I recalled how horrid PHP scoping was. It was a simple fix.

(more…)

wordpress it is *sigh*

Monday, February 4th, 2008

While my search for good blogware has turned up the empty set, I’ve taken the easy option and gone with wordpress.

What did I want from my blogware? Well:

  • a minimal markup for inline formatting
  • the ability to copy and paste code without having to escape it or encode HTML entities
  • extending the code to be fun…

The only decent markup language I’ve come across is reStructuredText, although I can tolerate mediawiki’s. It does things right:

  • the markup is pretty close to what I’d use if I was posting in plain text
  • you can escape the markup if you need to
  • you don’t need to escape literal blocks (apart from indenting them)
  • it supports higher-level things like metadata, xrefs, citations

The only problem is that it’s very python-centric. Even though it’s semi-standardised, it evolves as the docutils dev team add features to the docutils processor. There aren’t processors for perl, ruby or C, so it’s not the why-aren’t-we-using-this-it’ll-work-ootb solution that, say, YAML is in its domain.

The plugin that sealed the deal with wordpress was reST for wordpress. It is a hack: it calls “rst2html“ and rips the body out, and recommends you turn off the “correct invalidly nested XHTML automatically” feature of wordpress (although this may be to avoid pre-processing, rather than because the rst output is broken).

I really wanted hobix to work. It wasn’t going to happen. Apart from the markup issues, its maintenance future doesn’t look bright. A bunch of stuff is broken, and from my exposure to that code base, adding my own plugins is likely to be anything but fun.

The motivation to post is at the critical lower bound as it is, without procrastinating about mending the posting-platform.