https://bugs.documentfoundation.org/show_bug.cgi?id=148676

            Bug ID: 148676
           Summary: EDITING: Symbol '#' (Number) Brakes Hyperlink 'Target
                    To Document'
           Product: LibreOffice
           Version: 7.0.4.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Hello LibreOffice enthusiasts :)

Summary:
In LibreOffice Write 7.x, a Hyperlink to document is broken and unusable when
Writer's "Target to document" field include the symbol #.

Any volunteer for a patch? I would be happy to contribute testing and
documentation if needed

You're welcome to ask me if you have any questions, or need anything else about
this challenge

Cheers,

Francois Carpentier (Francewhoa)

Steps to Reproduce:
1. Using Debian version 10 (Buster), using GNOME, using Nautilus, create a
folder name "Folder #1"

______Note : To be able to reproduce this challenge, double check that you
include this symbol town "#" into the folder name

2. Inside this "Folder #1" above, add a fresh new Writer 7.x document. In this
example, we'll name this first document "Document_1.odt". If easier, in my
comment below, find the attached "Document_1.odt".

3. Again, using Nautilus, create a folder name "Folder #2"

4. Inside this "Folder #2" above, add a 2nd document named "Document_2.odt". If
easier, in my comment below, find the attached "Document_2.odt".

5. Using Writer, open the document "Document_1.odt". Navigate to "Insert" menu
---> "Hyperlink" option. The "Hyperlink" window will open.

6. Using this "Hyperlink" window, within its left side column, click on
"Document" icon. Within its right side column, under "Document" group, using
the "Link" field, add a link to the local "Document_2.odt". Click on "Validate"
button. The attached screenshot named "Hyperlink_window.png" show those 3
steps.

______Note : To be able to reproduce this challenge, double check that, into
the local path, you include the folder with the symbol town "#" in its name

7. Back into the "Document_1.odt", right-click on the Hyperlink. Which you
added above. Using the contextual menu, click on "Open Hyperlink" / "Ouvrir
l'hyperlien" option. The attached screenshot named "Context_menu.png" show
those 2 steps.

8. The "Document_2.odt" is expected to open. 

Actual Results:
In the last step number height above, the "Document_2.odt" somehow does not
open. This is the first challenge.

The second challenge is that, after doing all the steps above, edit again this
Hyperlink. Into the "Hyperlink" window, into the "Link" field, somehow Writer
broken the Link. Then automatically added the second part of the link into the
"Target" field below. But in this case, the use needs the full "Link" field to
remain full. Not broken.

Expected Results:
The needed end result is that, at step number height above, when the user click
on "Open Hyperlink" option, the "Document_2.odt" opens. Regardless of which
characters were used into the "Target To Document" local path to this
"Document_2.odt".



Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice:
• Version: 7.0.4.2
• Build ID: 00(Build:2)
• CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
• Locale: fr-CA (fr_CA.UTF-8); Langue IHM : fr-FR
• Debian package version: 1:7.0.4-4+deb11u1_bpo10+1
• Calc: threaded


System Linux:
• Base: Debian 10 Buster, 64-bit
• Gnome: 3.30.2
• Kernel: 5.10 Backport


Hardware:
• Dual screen
• Open source video driver
• Initial Debian install: Netinstall


What I tried that was effective:
• As a temporary, time-consuming, workaround, into all local folder names,
replace the symbol # with the word "number" without the quotes. Doing so always
works.


What I tried that was ineffective:
• Used a fresh new Writer document
• Used various different names for the Writer document
• Used a shorter local path
• Manually encoded the link


Suggested fix:
• How about those two steps?

___• Step 1 of 2, in the "Hyperlink" window above, when the user click on the
"Validate" button, in the "Link" field, automatically replace all # symbols
with a link encoding. Which automatically replace the symbols # with both "%23"
without the quotes, and the appropriate additional encoding. If you're not
familiar with link encoding, this documentation might be of interest at
https://www.urlencoder.io 
______• Example link BEFORE adding HTML code: file:///<LOCAL PATH>/Folder
#2/Document_2.odt
______• Example after AFTER HTML code:
file:///%3CLOCAL%20PATH%3E%2FFolder%20%232%2FDocument_2.odt

___• Step 2 of 2, in the "Hyperlink" window above, when the user click on the
"Validate" button, do not automatically assumes that are symbol # are meant to
be Target. In this case, they are meant to be folder need. So do not
automatically add a Target. If the user needs a target, he/she simply needs to
add the appropriate target into the "Target" field.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to