LPS-46713 Escaping string for JavaScript