Fix XSS vulnerability when saving HTML signatures (#1489251)