ddfreyne/nanoc — Issue #78: Work around crazy libxml2 encoding bug
Author: callahad
Created: 2011-12-14 07:46:56+00:00
State: open

Calling inner_html= results in all kinds of encoding weirdness due to a bug in a common version of libxml2. Building a tree of nodes and using children= instead works properly.

The bug is present in the version of libxml2 that ships with OS X Lion, so working around this in Nanoc itself should save a lot of users a good bit of trouble.

References:
https://github.com/tenderlove/nokogiri/issues/458

Patch:
https://bitbucket.org/callahad/nanoc/changeset/9002a6b7f3ef

Note that in my repo, this commit is applied on top of the patch for issue #77 ("Remove need for Pygments cleanup"), but they don't overlap, so it should be easy to disentangle them if, for some reason, you decide to reject the cleanup patch. I should really be using MQ for this sort of stuff...