Update the code to escape the html in template