LibreOffice removes additional space in URLs when opening saved docx file or after convert to PDF

Hi!

I use LO with CLI to convert .docx to .pdf and faced with this issue.
I use LibreOffice 7.6.4.1 and noticed one moment with URLs that LO removes additional space (%20).
Example link: https://google.com/Reference%20%20Materials/Tools%20%20-%20CPMC%20Approved%20List.pdf

I have .docx file with correct (above) link. If I open this file in LO - everything is ok and I can see double space in link.

If I save w/o changes this file using LO (word 2007 or 2010 .docx) I can see that everything is ok when opening this file in MS Word (I have 2 spaces in link) but opening this file in LO shows me only one space : https://google.com/Reference%20Materials/Tools%20-%20CPMC%20Approved%20List.pdf
If I open resaved with LO file and export to PDF - I also have link with one space.

And what is the question? Does Ctrl-click still open the right document? In which case it is only a cosmetic display matter. are you looking for a workaround? Then which one?

Are you the creator of the .docx? If so, convert it manually to native .odt format, making sure you don’t lose any information.

Copy link or Ctrl-click opens incorrect link with one space. The problem is only with docx file saved by LO. And in MS Word I can see two spaces in link but LO shows me one space and future processes with doc work with one space. But for me its broken link. Im trying to undestand and find solution how to prevent it.

Then it might be a conversion problem (from DOCX to ODF, and perhaps back). It may also come from the way the link is specified. To better diagnose, attach a sample file. All is needed is a few paragraphs containing the “faulty” link so that we can test and experiment.

Is the link mentioned in the question the real link. I clicked on it and got error 404. Is this just an example link for confidential reason?

output_test_original.docx (42.7 KB)
output_test_saved_by_lo.docx (28.3 KB)

Two files
First - original output .docx
Second - original output opened and saved by LibreOffice.

When I open second file using LO - I can see only one space in link (page 4)

It`s just an example link with 404.

This is definitely a bug. The URLs aren’t stored in the file correctly. Please file a bug report.

Thanks!
I`ll investigate it a bit to collect info and report a bug.

Please don’t spend time investigating. I already have a fix, so the sooner you file it (with simple description as here, and the sample from here), the sooner I fix it.

Created one. Hope correct.
https://bugs.documentfoundation.org/show_bug.cgi?id=159110

1 Like