Bug 69548 - In the microsoft word docx format, hyperlinks with spaces in between words in the url work but then change themselves after reopening document (libreoffice deletes the space in the url).
Summary: In the microsoft word docx format, hyperlinks with spaces in between words in...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.6.2 release
Hardware: All All
: high major
Assignee: Andras Timar
URL:
Whiteboard: target:4.2.0 target:4.1.4
Keywords:
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-09-18 19:51 UTC by esafe11
Modified: 2013-10-19 01:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esafe11 2013-09-18 19:51:48 UTC

    
Comment 1 esafe11 2013-09-18 20:09:14 UTC
a hyperlink with spaces in between words in the target/url works at first but once you save, close, then reopen the document the hyperlink has changed itself to get rid of spaces (this happens with all hyperlinks that have spaces in them whether they be to a bookmark within the document, a link to another document, a link to a bookmark in another document, etc.)
Comment 2 esafe11 2013-09-18 20:14:40 UTC
(In reply to comment #1)
> a hyperlink with spaces in between words in the target/url works at first
> but once you save, close, then reopen the document the hyperlink has changed
> itself to get rid of spaces (this happens with all hyperlinks that have
> spaces in them whether they be to a bookmark within the document, a link to
> another document, a link to a bookmark in another document, etc.)

*this happens with all hyperlinks that have spaces in their target/url whether ...
Comment 3 Mihkel Tõnnov 2013-10-12 17:18:50 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > a hyperlink with spaces in between words in the target/url works at first
> > but once you save, close, then reopen the document the hyperlink has changed
> > itself to get rid of spaces (this happens with all hyperlinks that have
> > spaces in them whether they be to a bookmark within the document, a link to
> > another document, a link to a bookmark in another document, etc.)
> 
> *this happens with all hyperlinks that have spaces in their target/url
> whether ...

Could you be more specific, i.e. what are the steps needed to observe this behaviour? Currently, I can't reproduce this on 4.1.3 RC1.

What I tried: Insert - Hyperlink, set some pseudo-URL with spaces in it as Target, saved the file, then closed and reopened it. Upon hovering the link the URL looked like it was before, and when I opened the hyperlink dialog again, the target was displayed as it was before there as well.
Comment 4 esafe11 2013-10-12 21:41:16 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > a hyperlink with spaces in between words in the target/url works at first
> > > but once you save, close, then reopen the document the hyperlink has changed
> > > itself to get rid of spaces (this happens with all hyperlinks that have
> > > spaces in them whether they be to a bookmark within the document, a link to
> > > another document, a link to a bookmark in another document, etc.)
> > 
> > *this happens with all hyperlinks that have spaces in their target/url
> > whether ...
> 
> Could you be more specific, i.e. what are the steps needed to observe this
> behaviour? Currently, I can't reproduce this on 4.1.3 RC1.
> 
> What I tried: Insert - Hyperlink, set some pseudo-URL with spaces in it as
> Target, saved the file, then closed and reopened it. Upon hovering the link
> the URL looked like it was before, and when I opened the hyperlink dialog
> again, the target was displayed as it was before there as well.

i'm using the most recent release 4.1.2.3 (it did this in a couple of previous releases. i don't know how far back it started doing this.) my OS is windows 7. if i make a bookmark (let's name it "hello world") within a document name "document-a" with a space in between the words the bookmark works fine even after reopening, however if i create a link (within the same document) to the bookmark then save and COMPLETELY CLOSE libreoffice then reopen the file, the link is now broken as the "TARGET IN DOCUMENT: URL" "hello world" has been changed to "helloworld". the same thing happens if i create a link within "document-a" to a document with spaces in between the title of the document ("document b"). if the target bookmark or document name has more than one space in it("i'm yakko warner") then upon reopening, the "TARGET IN DOCUMENT: URL" will have been changed to "i'm yakkowarner" (having only deleted one space).
Comment 5 esafe11 2013-10-12 21:51:33 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > a hyperlink with spaces in between words in the target/url works at first
> > > but once you save, close, then reopen the document the hyperlink has changed
> > > itself to get rid of spaces (this happens with all hyperlinks that have
> > > spaces in them whether they be to a bookmark within the document, a link to
> > > another document, a link to a bookmark in another document, etc.)
> > 
> > *this happens with all hyperlinks that have spaces in their target/url
> > whether ...
> 
> Could you be more specific, i.e. what are the steps needed to observe this
> behaviour? Currently, I can't reproduce this on 4.1.3 RC1.
> 
> What I tried: Insert - Hyperlink, set some pseudo-URL with spaces in it as
> Target, saved the file, then closed and reopened it. Upon hovering the link
> the URL looked like it was before, and when I opened the hyperlink dialog
> again, the target was displayed as it was before there as well.

forgot to specify: this happens in the microsoft word .docx format.
Comment 6 Mihkel Tõnnov 2013-10-13 06:35:31 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (In reply to comment #1)
> > > > a hyperlink with spaces in between words in the target/url works at first
> > > > but once you save, close, then reopen the document the hyperlink has changed
> > > > itself to get rid of spaces (this happens with all hyperlinks that have
> > > > spaces in them whether they be to a bookmark within the document, a link to
> > > > another document, a link to a bookmark in another document, etc.)
> > > 
> > > *this happens with all hyperlinks that have spaces in their target/url
> > > whether ...
> > 
> > Could you be more specific, i.e. what are the steps needed to observe this
> > behaviour? Currently, I can't reproduce this on 4.1.3 RC1.
> > 
> > What I tried: Insert - Hyperlink, set some pseudo-URL with spaces in it as
> > Target, saved the file, then closed and reopened it. Upon hovering the link
> > the URL looked like it was before, and when I opened the hyperlink dialog
> > again, the target was displayed as it was before there as well.
> 
> forgot to specify: this happens in the microsoft word .docx format.

Yep, confirmed with 4.1.3 RC1: when saving as "Microsoft Word 2007/2010 XML" (.docx), the *last space* in links with spaces is deleted.
Comment 7 Mihkel Tõnnov 2013-10-13 06:56:22 UTC
Also affected: "Office Open XML Text" (.docx)

Not affected: "Microsoft Word 27/2000/XP/2003" (.doc), "Microsoft Word 2003 XML" (.xml) and all other formats Writer can produce.

Calc ond Impress seem also not affected (.xlsx and .pptx/.ppsx do preserve all spaces in URLs).
Comment 8 Mihkel Tõnnov 2013-10-13 07:01:56 UTC
I tried with 3.6.6.2 and observed the same behaviour there as well (for .docx) -- setting version accordingly. The bug could be even older, of course.
Comment 9 Commit Notification 2013-10-16 11:36:00 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ee2ce24c4060e16b6aa852edfcbe5c531c89b6e

fdo#69548 do not remove last space from hyperlink target



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2013-10-17 15:57:58 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3dac8f65123aa6046e0e94c98faf0e9708a8cc98&h=libreoffice-4-1

fdo#69548 do not remove last space from hyperlink target


It will be available in LibreOffice 4.1.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 esafe11 2013-10-19 01:54:56 UTC
the patch works! thank you Andras!

i appreciate all the time and hard work the developers put into the software.