fix a typo
This commit is contained in:
parent
6349218d2f
commit
c249acab44
|
@ -112,14 +112,14 @@ def reduce_chars_newlines(text, max_chars = 0, max_lines = 0,
|
||||||
return reduced_text
|
return reduced_text
|
||||||
|
|
||||||
def escape_for_pango_markup(string):
|
def escape_for_pango_markup(string):
|
||||||
# escapes < > & \ "
|
# escapes < > & ' "
|
||||||
# for pango markup not to break
|
# for pango markup not to break
|
||||||
if string is None:
|
if string is None:
|
||||||
return
|
return
|
||||||
if gtk.pygtk_version >= (2, 8, 0) and gtk.gtk_version >= (2, 8, 0):
|
if gtk.pygtk_version >= (2, 8, 0) and gtk.gtk_version >= (2, 8, 0):
|
||||||
escaped_str = gobject.markup_escape_text(string)
|
escaped_str = gobject.markup_escape_text(string)
|
||||||
else:
|
else:
|
||||||
escaped_str =xml.sax.saxutils.escape(string, {'\\': ''',
|
escaped_str =xml.sax.saxutils.escape(string, {"'": ''',
|
||||||
'"': '"'})
|
'"': '"'})
|
||||||
|
|
||||||
return escaped_str
|
return escaped_str
|
||||||
|
|
Loading…
Reference in New Issue