fix javascript escaping to prevent xss attacks and now we support more characters in the titles and such