Kaydet (Commit) abb5e84c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst cead54b6
...@@ -176,7 +176,7 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const ...@@ -176,7 +176,7 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const
aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() ); aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() );
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) 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 else //#105788# always create a URL even if it is not valid
return aStrURL; return aStrURL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment