Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using library as SVG validator #78

Open
frank-miller9 opened this issue Apr 28, 2022 · 0 comments
Open

Using library as SVG validator #78

frank-miller9 opened this issue Apr 28, 2022 · 0 comments

Comments

@frank-miller9
Copy link

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:

  • If there are PHP opening/closing tags, the sanitizer cleans them, but it's never reported somewhere
  • If there is a comment in the SVG (which is ok I guess) it's reported as xmlIssue here
  • There is no differentiation between the errors a comment raises the same issue level as a javascript
  • It's hard to determinate what error occured just from having the strings (e.g. to output then custom error messages)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant