darylldoyle / svg-sanitizer

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

Allow attributes that Adobe Illustrator export makes #63

Open Bersman opened 3 years ago

Bersman commented 3 years ago

We have exported a SVG with Adobe and the sanitizer does not like that. It give the following errors: There are sanitization issues with this SVG file: Suspicious attribute 'space' in line 4 Suspicious attribute 'enable-background' in line 4

Generator is: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)

I wil make an PR for the enable-background attribute. The space attribute is something different. Because it's in the list. It's looks like that XPath or something else is removing the xml: prefix when walking over the elements. Will make a separated issue for this.

ohader commented 3 years ago

Can you please add an example SVG snippet showing usage of enable-background? Thx

ohader commented 3 years ago

Spotted <svg ... enable-background="new 0 0 600 600"> in PR #65