properly encode the html