diff options
authorJulien Nabet <>2018-02-03 15:23:48 +0100
committerAdolfo Jayme Barrientos <>2018-02-06 15:07:47 +0100
commitae86218101c27a2e35a10940661e4c6421870e71 (patch)
parent362b0c521c1c58dc8ea5e87ecbb482d5bdc073f4 (diff)
tdf#114731: persona html can contain &quot; instead of &#34;
So let's replace all &quot; with &#34 in the retrieved html Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e Reviewed-on: Tested-by: Julien Nabet <> Tested-by: Jenkins <> (cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e) Reviewed-on: Reviewed-by: Adolfo Jayme Barrientos <>
1 files changed, 4 insertions, 1 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index fa4d7f452072..d40742155adb 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -554,10 +554,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 &quot; or &#34;
+ // let's replace the whole buffer with last one so we can treat it easily
+ OString rBuffer = rBufferArg.replaceAll(OString("&quot;"), OString("&#34;"));
// it is the first attribute that contains "persona="
sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
if ( persona < 0 )