CID-1232335/CID-1232336 Fix potential XSS