Hyperlink with special characters

Hello everyone,

I’m using LO 7.6 to edit a docx file. This document holds a few hyperlinks pointing inside the same document, and their target are made with square brackets (for example [tname/]). These targets are replaced later by some automatic generation tool.
My problem is: when I save my docx file as a Word 2007 format, then reopen it, my square brackets inside the hyperlinks have been converted to some percent encoding. My example [tname/] became %5Btname%2F%5D, breaking the generation tool.
This unwanted conversion does NOT happen with LO 6.4. Is this a regression ? Do I have any way to prevent this ?

Thanks

I don’t think this is a regression. URI and URL standards have also evolved separately. With the foreseeable generalisation of IPv6, square brackets are special delimiters in the syntax. To avoid parsing errors in browsers and other utilities, square brackets are replaced with their %-encodings when they appear where they are not expected by URL syntax.

For most usages, Writer is a “terminal” product, i.e. no more processing are expected to be done on contents. You’re in a corner case (or perhaps rather a “niche” case). If you have complete control on your process, you can try to change your delimiters for ones not conflicting with URL syntax and not substituted by the generating phase in Writer. I suggest (if this is possible in your process and utilities) to use multi-character delimiters (instead of single characters [ and ]) which names never appears in any text like "1z0"for “[” and “0z1” for “]”. Choose them wisely.

Unfortunately the generating process is out of my hands so I’ll have to find another trick, but I thank you for your answer anyway ! Have a nice day

I have a macro-generator operating under Linux and possibly MacOS which could do the trick as a separate step in your process. It could handle the translation between [tname/] (in the input directives) and 1z0tnam/0z1 (in the “flattened” version of the DOCX). If interested, tell me and I send you the user manual.