Changed the html encoding code