darylldoyle / svg-sanitizer

A PHP SVG/XML Sanitizer
GNU General Public License v2.0
454 stars 67 forks source link

Allow clients to specifiy a HTMLPurifier_Config #92

Closed giuseppe-arcuti closed 11 months ago

giuseppe-arcuti commented 11 months ago

Hey,

HTMLPurifier does some caching by default, but on many production environments the directory is read-only. The HTMLPurifier_Config is not easily configurable with environment variables, so this patch adds the possibility to overwrite the default config with a custom one before calling sanitize. The patch doesn't change the behavior of existing code relying on this library :)

darylldoyle commented 11 months ago

Hey @giuseppe-arcuti 👋

Thanks for the PR but as of https://github.com/darylldoyle/svg-sanitizer/pull/89 we'll be removing the HTMLPurifier dependency as it's no longer needed.