Ensure entity value is type str
There are times when the entity value passed in for substitution is of type unicode. This causes Rsvg to fail when processing the SVG. This patch checks for unicode and converts it to utf-8. Fixes #4621
This commit is contained in:
parent
e01837f8be
commit
ec5f064c10
@ -62,7 +62,7 @@ class _SVGLoader(object):
|
||||
logging.error(
|
||||
'Icon %s, entity %s is invalid.', file_name, entity)
|
||||
|
||||
return Rsvg.Handle.new_from_data(icon)
|
||||
return Rsvg.Handle.new_from_data(icon.encode('utf-8'))
|
||||
|
||||
|
||||
class _IconInfo(object):
|
||||
|
Loading…
Reference in New Issue
Block a user