From 7daf946910a04863b6855df5ec29ff4d89a5070f Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Mon, 11 Nov 2024 17:04:41 +0100 Subject: 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 (cherry picked from commit 2c3fc08d119989f731a46a4af357e2366d3c508c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176461 Reviewed-by: Xisco Fauli --- cui/source/dialogs/hlinettp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cui') 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); -- cgit