Try a cleaner javascript escape function.