[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

Julien Nabet serval2412 at yahoo.fr
Tue Feb 6 12:07:10 UTC 2018


 cui/source/options/personalization.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0ca6361e138d21b7151f926609d497afb47e6966
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Feb 3 15:23:48 2018 +0100

    tdf#114731: persona html can contain " instead of "
    
    So let's replace all " with &#34 in the retrieved html
    
    Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
    Reviewed-on: https://gerrit.libreoffice.org/49179
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e)
    Reviewed-on: https://gerrit.libreoffice.org/49285
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index c75a78c8ef2e..9b3e482b55d2 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -553,10 +553,13 @@ static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color values.
-static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, OUString *pFooterURL,
+static bool parsePersonaInfo( const OString &rBufferArg, OUString *pHeaderURL, OUString *pFooterURL,
                               OUString *pTextColor, OUString *pAccentColor, OUString *pPreviewURL,
                               OUString *pName )
 {
+    // tdf#115417: buffer retrieved from html response can contain " or "
+    // let's replace the whole buffer with last one so we can treat it easily
+    OString rBuffer = rBufferArg.replaceAll(OString("""), OString("""));
     // it is the first attribute that contains "persona="
     sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
     if ( persona < 0 )


More information about the Libreoffice-commits mailing list