Improved HTML / XML output escaping.