summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2015-01-27 16:18:24 +0000
committerAndras Timar <andras.timar@collabora.com>2015-02-07 00:45:46 +0100
commit4327b7882c38005d89b07e76814705d1c53f3161 (patch)
tree94c978be2cb4de0cc53c48b261697e8796a9e16a
parentff424e420116b2123b62f7869af25d7caec65288 (diff)
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 <sbergman@redhat.com> (cherry picked from commit 0706b5756e06b7773a78e3046a47efc2c81d92b1) Signed-off-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
1 files changed, 3 insertions, 1 deletions
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 <IDocumentSettingAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <xmloff/odffields.hxx>
+#include <tools/urlobj.hxx>
#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 )