summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-03 00:35:14 +0100
committerAndras Timar <atimar@suse.com>2012-11-03 00:39:05 +0100
commitc1b4077d1ffa57d325bf1149ac198d91cf981e3b (patch)
treef4d65bc9e9013c8860542306a91a3ccb9abbf6a7 /l10ntools
parent56e40f3c602f7c85f61e5a196e3d820935b0c139 (diff)
escape quotes, unescape double escaped quotes fdo#56648
Change-Id: Id4135db2ec40865cddab533da15b2705dc7b73d5
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/lngmerge.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index b0282f5fb4d7..00a58d25a0ad 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -264,7 +264,8 @@ sal_Bool LngParser::Merge(
rtl::OString sText1( sLang );
sText1 += " = \"";
- sText1 += sNewText;
+ // escape quotes, unescape double escaped quotes fdo#56648
+ sText1 += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"");
sText1 += "\"";
*pLine = sText1;
Text[ sLang ] = sNewText;
@@ -299,7 +300,8 @@ sal_Bool LngParser::Merge(
rtl::OString sLine;
sLine += sCur;
sLine += " = \"";
- sLine += sNewText;
+ // escape quotes, unescape double escaped quotes fdo#56648
+ sLine += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"");
sLine += "\"";
nLastLangPos++;