Moved my code to auto escape html to the right place