Skip to content

Commit aed3e71

Browse files
author
Alexander Smishlajev
committed
escape quotes in msgids
1 parent d6b2b9d commit aed3e71

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roundup/cgi/TAL/talgettext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
##############################################################################
1515
# Modifications for Roundup:
1616
# 1. commented out ITALES references
17+
# 2. escape quotes in msgids
1718

1819
"""Program to extract internationalization markup from Page Templates.
1920
@@ -42,7 +43,7 @@
4243
#from ITALES import ITALESEngine
4344
from roundup.cgi.TAL.TALDefs import TALESError
4445

45-
__version__ = '$Revision: 1.3 $'
46+
__version__ = '$Revision: 1.4 $'
4647

4748
pot_header = '''\
4849
# SOME DESCRIPTIVE TITLE.
@@ -304,7 +305,7 @@ def write(self, s):
304305
for filename, position in positions:
305306
outfile.write('#: %s:%s\n' % (filename, position[0]))
306307

307-
outfile.write('msgid "%s"\n' % msgid)
308+
outfile.write('msgid "%s"\n' % msgid.replace('"', '\\"'))
308309
outfile.write('msgstr ""\n')
309310
outfile.write('\n')
310311

0 commit comments

Comments
 (0)