diff --git a/po2wxl.py b/po2wxl.py index 8a53322..59c9ed2 100755 --- a/po2wxl.py +++ b/po2wxl.py @@ -13,6 +13,7 @@ import sys import textwrap import os.path +from xml.sax.saxutils import escape import polib @@ -165,9 +166,9 @@ def usage(): f.write("\n") f.write(" \n \n") if entry.msgstr != "": - translation = entry.msgstr + translation = escape(entry.msgstr) else: - translation = entry.msgid + translation = escape(entry.msgid) translation = " ".join(translation.split("\n")).replace('\r', '').encode("utf-8") f.write(" " + translation + "\n")