deeplook / svglib

Read SVG files and convert them to other formats.
GNU Lesser General Public License v3.0
324 stars 79 forks source link

Guard against empty style tags #325

Closed stefanw closed 2 years ago

stefanw commented 2 years ago

An SVG with emtpy style tag like <style></style> breaks parsing because node.text is None and CSSMatcher doesn't like a None argument.

This PR fixes this by passing in an empty string if node.text is Falsey. Test included.

claudep commented 2 years ago

Excellent, thanks!