Avoid illegal chars error in js files