[Issue] Edit hyperlink: End key mangles the path!
[Issue] Edit hyperlink: End key mangles the path!
Hi All,
Apologies if this is a known issue but I've searched the bugbase and this forum for as long as I could bear before posting...
When editing a hyperlink, under certain circumstances, pressing the End key mangles the path. It seems to be triggered by spaces in the name, which makes me think I can't be the only one to have noticed this, surely...
Anyway, here's my repro:
Target files, all in My Documents, all txt but it happens with odt too:
New Text Document
New Text Document - Copy
New Text Document - Copy, 2
In a new document, type "test", select it, open the hyperlink panel and browse to "New Text Document".
The path field now reads "<YourDocs>\New Text Document.txt".
In the field, press End to show that nothing wrong happens.
Apply, Close and re-open.
The path field now reads "<YourDocs>\New%20Text%20Document.txt".
In the field, press End (highlit or not, doesn't matter)
The path field now reads "<YourDocs>\New%New Text Document.txt
Apply and test the link to show that this mangled path has in fact been written.
Below is a summary of the results for all three files:
originally <YourDocs>/New%20Text%20Document.txt
+ End key <YourDocs>/New%New Text Document.txt
originally <YourDocs>/New%20Text%20Document%20-%20Copy.txt
+ End key <YourDocs>/New%20TeNew Text Document – Copy.txt
originally <YourDocs>/New%20Text%20Document%20-%20Copy,%202.txt
+ End key <YourDocs>/New%20TextNew Text Document - Copy, 2.txt
Apologies if this is a known issue but I've searched the bugbase and this forum for as long as I could bear before posting...
When editing a hyperlink, under certain circumstances, pressing the End key mangles the path. It seems to be triggered by spaces in the name, which makes me think I can't be the only one to have noticed this, surely...
Anyway, here's my repro:
Target files, all in My Documents, all txt but it happens with odt too:
New Text Document
New Text Document - Copy
New Text Document - Copy, 2
In a new document, type "test", select it, open the hyperlink panel and browse to "New Text Document".
The path field now reads "<YourDocs>\New Text Document.txt".
In the field, press End to show that nothing wrong happens.
Apply, Close and re-open.
The path field now reads "<YourDocs>\New%20Text%20Document.txt".
In the field, press End (highlit or not, doesn't matter)
The path field now reads "<YourDocs>\New%New Text Document.txt
Apply and test the link to show that this mangled path has in fact been written.
Below is a summary of the results for all three files:
originally <YourDocs>/New%20Text%20Document.txt
+ End key <YourDocs>/New%New Text Document.txt
originally <YourDocs>/New%20Text%20Document%20-%20Copy.txt
+ End key <YourDocs>/New%20TeNew Text Document – Copy.txt
originally <YourDocs>/New%20Text%20Document%20-%20Copy,%202.txt
+ End key <YourDocs>/New%20TextNew Text Document - Copy, 2.txt
Last edited by Hagar Delest on Mon Aug 13, 2012 8:29 am, edited 1 time in total.
Reason: tagged the thread as Issue (link to a bug report).
Reason: tagged the thread as Issue (link to a bug report).
- Hagar Delest
- Moderator
- Posts: 32667
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Edit hyperlink: End key mangles the path!
With AOO 3.4.0 on Ubuntu 12.04, no problem (I don't even have the %20 string for spaces.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: Edit hyperlink: End key mangles the path!
I wonder if that's the problem. Wish I could turn it off so I could try it but I can't see a pref for it. I thought there was but I must be thinking of something else.Hagar Delest wrote:...the %20 string for spaces.
Re: Edit hyperlink: End key mangles the path!
Still happening under AOO 3.4! This is a nasty bug, suddenly your links stop working and it's hard to spot unless you're looking for it.
Re: Edit hyperlink: End key mangles the path!
Oops, no, wait. I see it now. You have to follow the exact sequence of steps.
The "%" escape sequences are only visible at certain points.
Here's what I did:
1) File > New > Text Document
2) Insert > Hyperlink
3) Link Type: Document; select a file that has spaces in the name; finish with "Open"
File path appears in dialog with normal space characters; same path as "URL" appears with %20 for spaces.
4)Click "Apply"
The hyperlink is inserted in the document; in the dialog, spaces in the path now appear as %20
Click in the path; press "End".
The %20 escapes disappear from the path being edited, but the path itself is now corrupted.
It really seems to be something specific to the "End" key--I can't make it happen with any other editing key.
I see it with OOo 3.3 and 3.2 so it's not a new problem.
The "%" escape sequences are only visible at certain points.
Here's what I did:
1) File > New > Text Document
2) Insert > Hyperlink
3) Link Type: Document; select a file that has spaces in the name; finish with "Open"
File path appears in dialog with normal space characters; same path as "URL" appears with %20 for spaces.
4)Click "Apply"
The hyperlink is inserted in the document; in the dialog, spaces in the path now appear as %20
Click in the path; press "End".
The %20 escapes disappear from the path being edited, but the path itself is now corrupted.
It really seems to be something specific to the "End" key--I can't make it happen with any other editing key.
I see it with OOo 3.3 and 3.2 so it's not a new problem.
AOO4/LO5 • Linux • Fedora 23
- Hagar Delest
- Moderator
- Posts: 32667
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Edit hyperlink: End key mangles the path!
OK, I see it too on Windows XP.
Seems there is no trend for the string repeated before the filename. Can be 2 or 10 characters, not linked with the first space.
-> Bug 120550 - End key corrupts path in hyperlink dialog.
Seems there is no trend for the string repeated before the filename. Can be 2 or 10 characters, not linked with the first space.
-> Bug 120550 - End key corrupts path in hyperlink dialog.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: [Issue] Edit hyperlink: End key mangles the path!
Glad you've spotted it and thanks for registering it, Hagar, although I wouldn't call it minor, having just converted a large set of documents over to odf!
If it's any consolation, LibreOffice 3.6 also has it (yes, I was prepared to jump ship over this one) so it's either very old or maybe something to do with Windows, seeing as you don't get it under Ubuntu.
Why doesn't this happen for all OS? And is there no hidden pref to stop the %20 substituting the spaces?
If it's any consolation, LibreOffice 3.6 also has it (yes, I was prepared to jump ship over this one) so it's either very old or maybe something to do with Windows, seeing as you don't get it under Ubuntu.
Why doesn't this happen for all OS? And is there no hidden pref to stop the %20 substituting the spaces?
- Hagar Delest
- Moderator
- Posts: 32667
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: [Issue] Edit hyperlink: End key mangles the path!
I'll check again with Ubuntu, perhaps I did not exactly the same.
But I'm rather surprised that it appears for acknak too since he's running GNU/Linux too (Fedora).
But I'm rather surprised that it appears for acknak too since he's running GNU/Linux too (Fedora).
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: [Issue] Edit hyperlink: End key mangles the path!
I saw it in LibO as well--I think it's been around a while, although I didn't go back further than 3.2.
Maybe related to the difference in length with/without the escapes? I.e. someone's counting characters with the escapes and applying that to the string with only spaces? Just a guess; I haven't looked at it.
I found several bugs related to paths with spaces in them, and converting them back and forth. Strange that this is such a problem; I don't understand why they ever want the user to see those escaped spaces? And on top of it, they're only doing it with spaces--not all the other characters that aren't allowed in URLs. Looks like a mess.
Maybe related to the difference in length with/without the escapes? I.e. someone's counting characters with the escapes and applying that to the string with only spaces? Just a guess; I haven't looked at it.
I found several bugs related to paths with spaces in them, and converting them back and forth. Strange that this is such a problem; I don't understand why they ever want the user to see those escaped spaces? And on top of it, they're only doing it with spaces--not all the other characters that aren't allowed in URLs. Looks like a mess.
AOO4/LO5 • Linux • Fedora 23
Re: [Issue] Edit hyperlink: End key mangles the path!
You might have something there, acknak. The escaped string and the corrupt string are exactly the same length. The corrupt part is the characters in the escaped filename that precede the length of the unescaped filename (perhaps easier to see in Notepad than explain, just copy the examples from the OP).acknak wrote:Maybe related to the difference in length with/without the escapes? I.e. someone's counting characters with the escapes and applying that to the string with only spaces? Just a guess; I haven't looked at it.
Re: [Issue] Edit hyperlink: End key mangles the path!
You need to Accept to get the escapes. Using End after simply selecting the file doesn't illustrate the issue.Hagar Delest wrote:I'll check again with Ubuntu, perhaps I did not exactly the same.