darylldoyle / svg-sanitizer

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

Using library as SVG validator #78

Open frank-miller9 opened 2 years ago

frank-miller9 commented 2 years ago

Hello @darylldoyle thank you for this great library, it works really well.

I would like to use this library as a validation when uploading a SVG. In general it works ok, but there are some "feature requests" which probably could improve the handling. The use case it, that we want to decide if we allow the upload of the SCG or not not to clean up the uploaded SVG.

So we tried to sanitize and then check if there are any xmlIssues or if sanitize returns false. So far so good, but we stumbled here over some challenges:

It would be nice to enhance the doc block comments with the description of the parameters and return values.

Is there anything which is on the roadmap for future releases?

Thank you in advance.