We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9913271 commit 7755492Copy full SHA for 7755492
po2wxl.py
@@ -13,6 +13,7 @@
13
import sys
14
import textwrap
15
import os.path
16
+from xml.sax.saxutils import escape
17
18
import polib
19
@@ -165,9 +166,9 @@ def usage():
165
166
f.write("\n")
167
f.write(" <!--" + entry.comment.replace('\n', ' -->\n <!--') + " -->\n")
168
if entry.msgstr != "":
- translation = entry.msgstr
169
+ translation = escape(entry.msgstr)
170
else:
- translation = entry.msgid
171
+ translation = escape(entry.msgid)
172
translation = " ".join(translation.split("\n")).replace('\r', '').encode("utf-8")
173
f.write(" <String Id=\"" + entry.msgctxt.encode("utf-8") + "\">" + translation + "</String>\n")
174
0 commit comments