darylldoyle / svg-sanitizer

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

Add option for keeping/removing the XML tag #14

Closed hugopeek closed 7 years ago

hugopeek commented 7 years ago

In response to the changes introduced here: https://github.com/darylldoyle/svg-sanitizer/issues/11

I'm using svg-sanitize to parse the output inline, so I actually prefer to have the XML tag removed. For both use cases to happily coexist, I added an option for this (which defaults to false, so compatible with current implementations).

Works perfectly for me, but I'm not a PHP hero so please double check if I didn't miss anything obvious..

darylldoyle commented 7 years ago

Looks good to me @hugopeek, thanks for the PR. I'll merge it shortly!