LPS-32031 Xss fixes - always escape in the last moment