checking/cleaning javascript html