Bug 45777 - Dangerous handling of ending spaces in hyperlinks
Summary: Dangerous handling of ending spaces in hyperlinks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: All All
: medium normal
Assignee: Thomas Arnhold
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-08 06:50 UTC by Nicolas Mailhot
Modified: 2013-10-16 08:39 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 Nicolas Mailhot 2012-02-08 06:50:20 UTC
Writer does not check for spaces in hyperlinks and blindly transforms them in %20

As a result, it is very easy to create non-working hyperlinks when cutting and pasting from a source where the link target is followed by one or more spaces

Writer should cull the spaces at the end of target hyperlinks or at least warn they exist when the target is set or modified
Comment 1 sasha.libreoffice 2012-03-21 07:36:29 UTC
Reproduced in 3.5.1 on Fedora 64 bit
Steps to reproduce
0. Start Writer
1. Enter some text
2. Select text and do Insert->Hyperlink 
3. enter web address into "Target" field with spaces at end
4. Ctrl-click resulting link. 
Expected: start web-browser
Actually: nothing happens

If "Target" field contains spaces, it not transforms to http://address/ form. Just remains as is. May be such behaviour is useful for non-http address? But there selected that it is Web, in tooltip written "Create an http hyperlink".
Comment 2 Commit Notification 2013-10-16 04:33:00 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

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

fdo#45777: handling of whitespaces in hyperlinks



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 3 sasha.libreoffice 2013-10-16 08:39:50 UTC
Thanks for improving this dialog