the method tries to remove all characters besides number, letter, under score. Because of the same string was used into html attribute and javascript, if we want to escape them, the result will be different, And those non variable-name characters could cause javascript error.