#2244 some fix about the JS and UTF-8 escape