javascript extension filter modified

added a more proper filter to get rid of unnecessary chars