Is it possible to preserve white spaces?
Opened this issue · 0 comments
mrmacete commented
Apparently all white spaces are lost at parse time because of this:
https://github.com/darylldoyle/svg-sanitizer/blob/master/src/Sanitizer.php#L105
$this->xmlDocument->preserveWhiteSpace = false;
is this vital to sanitisation or does it make sense to have it configurable (or even true
by default) ?
there are legit SVG files, like the ones produced by the freeze tool [0] which rely on white spaces to properly format textual content sampled from terminals, and would be great to support them all the way down to WordPress sanitisation, as those are great for technical blogposts!