[SECURITY] Prevent XSS in TER download dialog