summaryrefslogtreecommitdiff
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:46:13 +0100
commitf28d71c29b83a0899922c8f32da0fa05458882e2 (patch)
tree57514baafa696ccf0c689ebf2907ef2f641e0735
parentaf7141ee109ea9fa73866d3663ef5f1b73dfc30a (diff)
escape quotes, unescape double escaped quotes fdo#56648
Change-Id: Id4135db2ec40865cddab533da15b2705dc7b73d5
-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 6541bd9ab2ba..3a7a8d5f731e 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -271,7 +271,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;
@@ -306,7 +307,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++;