HTML sanitization using javascript's Number() function