darylldoyle / svg-sanitizer

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

suggestion/ remove first line; <?xml #51

Closed xerc closed 3 years ago

xerc commented 3 years ago

"The XML declaration is only required if you are using a non-Unicode character encoding" ref. https://oreillymedia.github.io/Using_SVG/extras/ch01-XML.html

ohader commented 3 years ago

Sounds more like a tidy-feature to me. Users have to configure that behavior individually - removing <?xml prologue per default does not seem to be a good idea.

xerc commented 3 years ago

fyi/ this tool add this line even if it is not there in the first place

ohader commented 3 years ago

@xerc I've kick-started a possible solution, to basically avoid adding <?xml> prolog in case it was not there before. I'm looking forward getting feedback on that. Thx!