general template html code cleansing