From 4327b7882c38005d89b07e76814705d1c53f3161 Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Tue, 27 Jan 2015 16:18:24 +0000 Subject: tdf#76291 write encoded URL as href in html output INetURLObject class is used to create correctly encoded URL Change-Id: Icc9e71e848fd8a0b487f74232b9ad3e7ddde50b4 Signed-off-by: Stephan Bergmann (cherry picked from commit 0706b5756e06b7773a78e3046a47efc2c81d92b1) Signed-off-by: Andras Timar --- sw/source/filter/html/wrthtml.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index f9d60e56f4bb..26b8ab63b2dc 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -81,6 +81,7 @@ #include #include #include +#include #define MAX_INDENT_LEVEL 20 @@ -1197,7 +1198,8 @@ OUString SwHTMLWriter::convertHyperlinkHRefValue(const OUString& rURL) } } } - return URIHelper::simpleNormalizedMakeRelative(GetBaseURL(), sURL); + INetURLObject aURL( sURL ); + return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), aURL.GetMainURL( INetURLObject::NO_DECODE ) ); } void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) -- cgit v1.2.3