[Libreoffice-commits] core.git: sw/source

Vasily Melenchuk vasily.melenchuk at cib.de
Mon Feb 2 01:58:08 PST 2015


 sw/source/filter/html/wrthtml.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 0706b5756e06b7773a78e3046a47efc2c81d92b1
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
Date:   Tue Jan 27 16:18:24 2015 +0000

    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 at redhat.com>

diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 64c8507..eaa8831 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 )


More information about the Libreoffice-commits mailing list