Convert characters to HTML entities in output