scour
scour copied to clipboard
Scour - An SVG Optimizer / Cleaner
When considering to prune attributes set to a default values, we checked the `gradientUnits` attribute first to determine if that was valid. Unfortunately, we omitted to check whether the `gradientUnits`...
This PR adds CI support for the IBM Power Little Endian (ppc64le) architecture. The idea is to ensure that the builds on this architecture are continuously tested along with the...
scour on the current master branch fails to process several of the SVG 1.1 reference SVGs. Below is one of these failures: ``` Processing paths-data-20-f.svg Traceback (most recent call last):...
I ran the following Scour 0.35 command with [image.svg](https://gist.github.com/HatScripts/4531bb51b04d7134c69d36b8abe0a1be) (2829 bytes) as the input file: `scour -i image.svg -o image-scoured.svg --enable-viewboxing --enable-id-stripping --enable-comment-stripping --shorten-ids --indent=none` Which produced image-scoured.svg (1287 bytes)....
Fixes #141
in Google Chrome it removes the marker (maybe a rending-bug) # Input  ```xml ``` # Output  ```xml ``` # differences `d="m1.38-0.79 0 0" marker-start="url(#a)"` changes to `d="m1.38-0.79" marker-start="url(#a)"`...
Least significant digit that is equal to length precision can be safely rounded up or down if the digit is 1, 2, 8, 9. This is equivalent to 20% less...
IMO, scour really deserves a better README. both visually, and content wise, as the first user experience / contact with scour will either be - https://github.com/codedread/scour/blob/master/README.md or - https://pypi.python.org/pypi/scour
Here is a pretty good article on the topic: https://kinsta.com/blog/wordpress-svg/#svg-security. It links for more information to https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing, https://www.owasp.org/images/0/03/Mario_Heiderich_OWASP_Sweden_The_image_that_called_me.pdf There is a PHP implementation at https://github.com/darylldoyle/svg-sanitizer. Maybe Scour could include similar...
I use `scour` as a module in a web app. Previously, I was doing this: ``` python opts = scour.parse_args(args=[...])[0] output = scour.scourString(svg, opts) ``` But that fails in version...