[Libreoffice-commits] core.git: 2 commits - l10ntools/source

Thorsten Behrens tbehrens at suse.com
Fri Feb 15 06:19:21 PST 2013


 l10ntools/source/lngmerge.cxx    |    4 ++--
 l10ntools/source/stringmerge.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit adc62310b8539c7be1c0a5a943b82fb7db9b0a0d
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Fri Feb 15 15:03:02 2013 +0100

    Only escape double-quotes for ulf files.
    
    On second thought, this was needlessly overbroad. Missed the fact
    that the code is strictly for ulf.
    
    Change-Id: I96773d6e2a9af473e8c8309421b4900c0b76667f

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 812c436..71f68ef 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -269,7 +269,7 @@ sal_Bool LngParser::Merge(
                                 rtl::OString sText1( sLang );
                                 sText1 += " = \"";
                                 // escape quotes, unescape double escaped quotes fdo#56648
-                                sText1 += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"").replaceAll("\'","\\\'").replaceAll("\\\\\'","\\\'");
+                                sText1 += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"");
                                 sText1 += "\"";
                                 *pLine = sText1;
                                 Text[ sLang ] = sNewText;
@@ -307,7 +307,7 @@ sal_Bool LngParser::Merge(
                         sLine += sCur;
                         sLine += " = \"";
                         // escape quotes, unescape double escaped quotes fdo#56648
-                        sLine += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"").replaceAll("\'","\\\'").replaceAll("\\\\\'","\\\'");
+                        sLine += sNewText.replaceAll("\"","\\\"").replaceAll("\\\\\"","\\\"");
                         sLine += "\"";
 
                         nLastLangPos++;
commit c915f0e243762ba66fcd51a67b6ec42911e05ee9
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Fri Feb 15 13:45:01 2013 +0100

    Proper escaping of quotes for android xml resource files.
    
    Change-Id: I9f76986465af5798f1451d44af6765f4e5d1bb09

diff --git a/l10ntools/source/stringmerge.cxx b/l10ntools/source/stringmerge.cxx
index 26aabcb..378548e 100644
--- a/l10ntools/source/stringmerge.cxx
+++ b/l10ntools/source/stringmerge.cxx
@@ -161,7 +161,7 @@ void StringParser::Merge(
             {
                 OString sNewText;
                 pEntrys->GetText( sNewText, STRING_TYP_TEXT, m_sLang );
-                sNewText = sNewText.replaceAll("\"",""").replaceAll("\\\\\"","\\\"").replaceAll("\'","'").replaceAll("\\\\\'","\\\'");
+                sNewText = sNewText.replaceAll("\'","\\\'").replaceAll("\"","\\\"");
                 xmlNodeSetContent(
                     pCurrent,
                     xmlEncodeSpecialChars( NULL,


More information about the Libreoffice-commits mailing list