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

Stephan Bergmann sbergman at redhat.com
Wed Jan 28 09:04:13 PST 2015


 cui/source/dialogs/hlinettp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit abb5e84c74b781f3615862695db4e5eaadc12cfe
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 28 18:00:14 2015 +0100

    Do not corrupt URIs entered into the Hyperlink dialog
    
    ...by fully decoding them via DECODE_WITH_CHARSET (where charset defaults to
    UTF-8) instead of merely normalizing them to IRIs via DECODE_TO_IRI.  For
    example, entering
    
      http://example.com/foo%2Fbar
    
    into the Hyperlink dialog would have resulted in a corrupted URI
    
      http://example.com/foo/bar
    
    Change-Id: Ic37859afa59c3fdc3280cf4803d4334026e1f336

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 6108925..7b198b6 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -176,7 +176,7 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const
         aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() );
 
     if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
-        return aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+        return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
     else //#105788# always create a URL even if it is not valid
         return aStrURL;
 }


More information about the Libreoffice-commits mailing list