Download it now!
Bug 123890 - When selected text starts with a slash, inserting a hyperlink creates one link for the slash and another for the rest
Summary: When selected text starts with a slash, inserting a hyperlink creates one lin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: notBibisectable, regression
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2019-03-06 06:46 UTC by msaghaei
Modified: 2020-04-05 05:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
a sample writer file demonstration the problem (8.11 KB, application/vnd.oasis.opendocument.text)
2019-03-06 06:46 UTC, msaghaei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description msaghaei 2019-03-06 06:46:00 UTC
Created attachment 149759 [details]
a sample writer file demonstration the problem

When a piece of text which starts with a forward slash is selected and then a hyperlink defined in the insert hyperlink dialog, the result will be two links with similar targets but with differing texts. The text for the first link is a single slash and for the next link is the remainder of the text.
Steps to reproduce:
sample text = "/for" {without double quotes of course}
sample link = "http://www.example.com"

1 - create the link with the sample text and link and save the file
2 - rename the file to a zip file
3 - extract the zip file
4 - open the "content.xml" file in the extracted folder
5 - search for the sample link
6 - you will find two links one with a "/" and another with the "for":

first link
<text:a xlink:type="simple" xlink:href="http://www.example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">/</text:a>

second link
<text:a xlink:type="simple" xlink:href="http://www.example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:span text:style-name="T1">for</text:span></text:a></text:p></office:text></office:body></office:document-content>
Comment 1 msaghaei 2019-03-06 09:05:31 UTC
This problem is only seen when inserting a hyperlink to a selected text using context (or top bar) menu. If no text selected and the link text entered in the hyperlink dialog, this behavior is not observed.
Comment 2 alicetaylor 2019-03-07 06:32:11 UTC Comment hidden (spam)
Comment 3 Buovjaga 2019-04-08 18:11:33 UTC
Weird: I got inconsistent results.

First try, with Ctrl-K, no repro.
Second try, with menu item, repro.
Third try, with Ctr-K, repro.

Will check with older versions next.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: e967aea2d8cc4f9fc608cb726cb474c184fb61de
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 7 April 2019
Comment 4 Buovjaga 2019-04-08 18:48:37 UTC
Also confirmed on Windows 10.

Bibisected on Linux with 43all to range https://gerrit.libreoffice.org/plugins/gitiles/core/+log/43c7830b03d141ae11d8617c0fdabefa32dd243c..ce97851773a06103504972eb2771eecd7dd81e36

Unfortunately, the range is huge and by quickly checking I did not find anything relevant. The inconsistent results mentioned in my previous comment also cast suspicion on any bibisect.
Comment 5 Aron Budea 2020-04-05 05:47:53 UTC
Let's use keyword notBibisectable, then.

Btw, two other bug reports related to hyperlink editing have been bibisected to this range (bug 99912 and bug 124296), which makes me think the same change or series of changes might be responsible for these.