Fix premature HTML encoding

Fixes #254 and possibly others.

This is a breaking change! Please read commit messages for details.