Skip to content

Commit 0fb9563

Browse files
authored
Merge pull request #17 from emmapeel2/patch-2
escape backlashes
2 parents db0b8a2 + 48ce629 commit 0fb9563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lektor_i18n.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def as_pot(self, content_language):
119119

120120
for msg, paths in self.translations.items():
121121
result += "#: %s\n"%" ".join(paths)
122-
for token, repl in {'\n': '\\n', '\t': '\\t', '"': '\\"'}.items():
122+
for token, repl in {'\\': '\\\\', '\n': '\\n', '\t': '\\t', '"': '\\"'}.items():
123123
msg = msg.replace(token, repl)
124124
result+='msgid "%s"\n' % msg
125125
result+='msgstr ""\n\n'

0 commit comments

Comments
 (0)