darylldoyle / svg-sanitizer

A PHP SVG/XML Sanitizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sanitizer removes too much of data from SVG

FreddieChopin opened this issue · comments

When the attached file is uploaded via this plugin, the arrow on the vertical axis is rotated 90degrees - instead of pointing up it points to the right.

Original:
scheduling.zip

Sanitized:
scheduling-sanitized.zip

Wrong:
screenshot from 2016-11-26 22-46-35

Correct:
screenshot from 2016-11-26 22-48-47

If's hard to get any useful diff, as the plugin also changes all whitespace in the file...

Just to be clear, I'm using sanitizer via Safe SVG plugin in wordpress.

Thanks for the report Freddie, I've narrowed this down to the orient attribute being stripped from the arrowheads.

I'll take a closer look at this tonight and hopefully get a fix up for you!

7a1e995 fixes this one. A WordPress plugin update will follow shortly!

Thanks, the arrow is no longer changed!