Simplestyle extension helper breaks on spaces in styles (with fix)
Bug #837603 reported by
nikitakit
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
nikitakit |
Bug Description
Simplestyle doesn't work with styles that contain spaces after the colon, e.g. "stop-color: rgb(0,0,0);" (note space after ':') The resulting style will have a color value that begins with a space, which can't be parsed by parseColor.
Proposed fix: strip spaces surrounding style keys and values.
For example, replace [share/
return dict([i.split(":") for i in s.split(";") if len(i)])
with:
return dict([[x.strip() for x in i.split(":")] for i in s.split(";") if len(i)])
tags: | added: extensions-plugins styles |
Changed in inkscape: | |
assignee: | nobody → JazzyNico (jazzynico) |
importance: | Undecided → Low |
milestone: | none → 0.49 |
status: | New → In Progress |
tags: | added: backport-proposed |
tags: | added: color |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix committed in the trunk, revision 10610.
Thanks for the patch!