summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2024-11-11 17:04:41 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-11-12 13:27:45 +0100
commit7daf946910a04863b6855df5ec29ff4d89a5070f (patch)
tree288c13d1bf44fbd52d3a91945c9a5dda0d7fd185 /cui
parentbbbb0c62eb26957a30f1d7ec43a73c7eda4cb339 (diff)
tdf#162753 - Hyperlink dialog: trim leading/trailing whitespaces of URLs
Change-Id: Ic18d30239e8741f8a28e81e423d3dc223d709a93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176409 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 2c3fc08d119989f731a46a4af357e2366d3c508c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176461 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index c64f8e7fa01b..2269f3447296 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -91,7 +91,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL)
if (xTransferable->getTransferData(aFlavor) >>= aClipBoardContent)
{
// tdf#162753 - allow only syntactically valid hyperlink targets
- INetURLObject aURL(aClipBoardContent);
+ INetURLObject aURL(o3tl::trim(aClipBoardContent));
if (!aURL.HasError())
aStrURL
= aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);