scour needs unnecessary spaces in d-attribute of path-tag
Created by: JoKalliauer
Processing Discriptionpage:Latin letter Kĸ (kra) RSVG-BUG.svg with
scour Latin_letter_Kĸ_(kra)_RSVG-BUG.svg output.svg
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg viewBox="0 0 723.09 231" xmlns="http://www.w3.org/2000/svg">
<path d="M435.89 115.9l61.04 60.67c10 10 18.6 16.8 25.63 20.45s14.2 5.68 21.24 6.16v4.52h-78.74v-4.52c4.72 0 8.12-.79 10.19-2.38 2.08-1.59 3.11-3.36 3.11-5.31s-.39-3.7-1.16-5.25-3.32-4.44-7.63-8.67l-57.13-56.52v53.34c0 8.38.53 13.9 1.59 16.6.81 2.03 2.52 3.78 5.13 5.25 3.5 1.95 7.2 2.93 11.11 2.93h5.62v4.52h-70.56v-4.52h5.86c6.84 0 11.8-1.99 14.89-5.98 1.95-2.6 2.93-8.87 2.93-18.8V71.46c0-8.38-.53-14-1.59-16.72-.81-1.95-2.48-3.66-5-5.13a23.16 23.16 0 00-11.23-2.93h-5.86v-4.52h70.56v4.52h-5.62c-3.82 0-7.53.94-11.11 2.81-2.52 1.3-4.27 3.26-5.25 5.86s-1.46 7.98-1.46 16.11v50.66c1.63-1.55 7.2-6.71 16.72-15.5 24.2-22.1 38.8-36.9 43.82-44.31 2.2-3.26 3.3-6.1 3.3-8.54 0-1.87-.85-3.52-2.56-4.94s-4.6-2.14-8.67-2.14h-3.78v-4.52h60.79v4.52c-3.58.08-6.84.57-9.77 1.46-2.93.9-6.51 2.62-10.74 5.19-4.23 2.56-9.44 6.69-15.63 12.39-1.79 1.63-10 9.97-24.78 25.02z"/>
<path d="M603.92 119.82v24.9l27.95-25.39c5.53-5.05 8.81-8.2 9.83-9.46s1.53-2.54 1.53-3.85c0-3.74-2.89-5.78-8.67-6.1v-4.64h48.58v4.64c-6.51.08-12 1.06-16.54 2.93s-9.38 5.21-14.59 10.01l-28.2 25.88 28.69 36.25c9.68 12.2 16.5 19.9 20.32 22.95a21.16 21.16 0 0013.61 4.64h3.05v4.52h-54.32v-4.52c5.29-.08 7.93-1.75 7.93-5 0-1.79-1.63-4.76-4.88-8.91l-34.3-43.82v37.11c0 8.22.87 13.7 2.62 16.48s6.9 4.15 15.44 4.15v4.52h-56.88v-4.52c8.06 0 13.2-1.34 15.32-4.03s3.23-8.02 3.23-15.99v-62.38c0-8.71-1.14-14.3-3.42-16.66s-7.16-3.6-14.65-3.6v-4.64h56.88v4.64c-7.98 0-13.1 1.3-15.26 3.91-2.2 2.6-3.3 7.93-3.3 15.99z"/>
</svg>
leads to the error:
Traceback (most recent call last):
File "C:\Python27\Scripts\scour-script.py", line 11, in <module>
load_entry_point('scour==0.36', 'console_scripts', 'scour')()
File "c:\python27\lib\site-packages\scour\scour.py", line 3920, in run
start(options, input, output)
File "c:\python27\lib\site-packages\scour\scour.py", line 3888, in start
out_string = scourString(in_string, options).encode("UTF-8")
File "c:\python27\lib\site-packages\scour\scour.py", line 3371, in scourString
doc = xml.dom.minidom.parseString(in_string)
File "c:\python27\lib\xml\dom\minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "c:\python27\lib\xml\dom\expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "c:\python27\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
the reason seems to be that in the path-tag the d-attribute some not needed spaces are deleted:
- "0 00-11.23" instead of "0 0 0-11.23"
- "0 0013.61" instead of "0 0 0 13.61"
Following software renders it correctly:
- Google Chrome
- Mozilla Firefox
- Internet Explorer
- Inkscape