Escape unknown/unapproved XML entities found in markdown

Fixes #438 

This may not be the way you want to do it, but I decided to use my running into the bug as a chance to dig through the code and take a shot at it.

Switching on the error message is, um, "less than ideal", but lxml doesn't give you much to work with.