Protect from a None value

svn: r19824
This commit is contained in:
Doug Blank 2012-06-11 20:45:30 +00:00
parent a39e9e057a
commit ef5c99e015

View File

@ -216,7 +216,7 @@ class HtmlBackend(DocBackend):
value = str(value)
elif tagtype == DocBackend.FONTFACE:
#fonts can have strange symbols in them, ' needs to be escaped
value = value.replace("'", "\\'")
value = value.replace("'", "\\'") if value else ""
return ('<span style="%s">' % (self.STYLETAG_TO_PROPERTY[tagtype] %
(value)),
'</span>')