Living In a Fool’s Paradise
Instiki uses Maruku which, in turn, uses REXML to build a tree from its input, and then serializes the result. In theory, the result of serializing a REXML tree is well-formed XML.
require 'rexml/document' foo = REXML::Document.new("<div>a�b</div>") bar = REXML::Formatters::Default.new out = String.new bar.write(foo, out) puts out
(and countless other variations on this theme).
Download the latest version. It’s been (somewhat) bullet-proofed against this sort of inanity.
1 Sam Ruby has been exploring other bugs in REXML lately. I wish him the best of luck.
Re: Living In a Fool’s Paradise
Have anything to add to this list?