sanitize html content before rendering pdf