Bug 113526 - Equal sign at end of hyperlink not included as part of hyperlink
Summary: Equal sign at end of hyperlink not included as part of hyperlink
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2017-10-30 16:21 UTC by Yousuf Philips (jay) (retired)
Modified: 2025-11-19 15:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-10-30 16:21:48 UTC
steps:
1. open writer
2. paste 'https://fontlibrary.org/en/search?lang=arabic&order=' (without quotes)
3. press spacebar so it can be automatically converted into hyperlink
4. last '=' isnt included as part of hyperlink

Version: 6.0.0.0.alpha1+
Build ID: 43d6b11a5c1dda0cc2c1e06c768eece25051a56c
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-10-30 16:34:29 UTC
Confirmed in

Version: 6.0.0.0.alpha1+
Build ID: d30522e46ca884e9bc74af21711d9537e8118859
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 Xisco Faulí 2017-11-02 14:42:40 UTC
Same happens with '#'
Comment 3 Xisco Faulí 2017-11-02 14:46:51 UTC
bug 45777 seems similar. I'll take a look
Comment 4 Stephan Bergmann 2017-11-03 11:12:27 UTC
Detecting a URL in free-form text uses some heuristics to determine what part of the text constitutes a URL and, especially, where exactly the found URL ends and what characters (that might even legally be part of the URL) following it are instead "punctuation" in the free-form text.

The heuristics currently employed by LO (as implemented in URIHelper::FindFirstURLInText, svl/source/misc/urihelper.cxx) consider a trailing '=' at the end of the fragment, query, or path part (if it does not detect any further parts following that part) as delimiting "punctuation" rather than as part of the URL.

Interestingly, LO appears to not be only with using such a heuristic.  Witness whatever software is responsible for it having converted the free-form text in comment 0 into

> 2. paste '<a href="https://fontlibrary.org/en/search?lang=arabic&amp;order">https://fontlibrary.org/en/search?lang=arabic&amp;order</a>=' (without quotes)

i.e., having decided that the trailing '=' should not be treated as part of the URL, either.

Is anybody aware of a pressing need to change the heuristic to treat a trailing '=' in an otherwise non-empty query part not followed by a fragment part (as exemplified in the original request in comment 0) as being part of the URL?  (And also treat such a '=' as part of the URL in even more places?  Also at the end of an otherwise empty query part?  Also at the end of an empty/non-empty path or fragment part?)  Otherwise, I would suggest to not touch the current heuristics.  Such heuristics are always somewhat brittle, and changing them has always potential for (real or perceived) regressions (e.g., somebody else might be upset by finding a trailing '=' now be considered part of the URL, after decades of different behavior).

And regarding "Same happens with '#'" (comment 2):  A '#' starting a fragment part that would be empty is indeed not considered by the heuristics as being part of the URL.  I consider that a feature rather than a bug.
Comment 5 Yousuf Philips (jay) (retired) 2017-11-03 14:30:58 UTC
To me this is a bug as equal is a valid character of the query part of the url, so i tested the issue on other word processors

Work like LO
* Word 2013
* Softmaker TextMaker

Work different to LO
* WPS Writer
* Google Docs
* WordPerfect
Comment 6 Xisco Faulí 2017-11-03 16:47:50 UTC
> Work like LO
> * Word 2013
> * Softmaker TextMaker

Same in Word 2010.

However, Word 2010 includes the # in

1. http://crashreport.libreoffice.org/stats/#
2. http://crashreport.libreoffice.org#
Comment 7 Xisco Faulí 2018-02-02 09:17:49 UTC
I abandoned my patch in https://gerrit.libreoffice.org/#/c/44241/
Comment 8 QA Administrators 2019-02-03 04:21:17 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-02-03 04:14:32 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2023-10-30 03:13:10 UTC Comment hidden (obsolete)
Comment 11 Yousuf Philips (jay) (retired) 2025-11-19 15:34:37 UTC
Still present.

Version: 25.8.3.2 (X86_64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


== Additional tests ==

Works like LO
* Word 2016, Word 2019

Works different to LO
* OnlyOffice
* Word for Web (onedrive)