GNOME Bugzilla – Bug 303902
Links with spaces in them are broken
Last modified: 2008-02-26 20:52:00 UTC
Please describe the problem: If I drag the folder "My Downloads" from Nautilus to Tomboy I get a link like (html-notation for clarity) <a href="/home/mikkel/My"> Downloads If I manually type in the %20 escape sequence for the white space it works ok. Ie typing /home/mikkel/My%20Downloads result in a working link <a href="/home/mikkel/My Downloads"> Steps to reproduce: 1. Drag a folder which filename contains a white space to Tomboy 2. Observe 3. Actual results: Expected results: Does this happen every time? Other information:
Argh! How do I make html escapes in Bugzilla? Testing: <a href="/home/mikkel/My"> Downloads <a href="/home/mikkel/My Downloads">
Manually editing the relevant line in the note from <link:url>/home/mikkel/My</link:url> Downloads to <link:url>/home/mikkel/My Downloads</link:url> also works. Maybe Tomboy should check whether the file exists before making something a link. If then it discovers something that looks like a link but has no corresponding file, it would try including the next whitespace separated word, and if that was a file, make the text a link... Example. I have the file "/home/mikkel/My Downloads". The parse would then go as follows: - /home/mikkel/My does not exists. - Do nothing or indicate a broken link - Attach the next word to the string and look for that file. Ie. look for "/home/mikkel/My Downloads" - If it exists, make it a link. Problem: How many whitespaces should the parser dig down in search of an existing file? Perhaps a scheme where it scans "ls /home/mikkel/My*" would be better. It almost definitely would :) Cheers!
*** Bug 155063 has been marked as a duplicate of this bug. ***
this bug seems to be fixed for local files and folders in version 0.3.5 (in ubuntu 6.06). however typing in urls with spaces in them or that end in brackets are not "linkified" properly. for example: http://dx.doi.org/10.1061/(ASCE)0733-9372(2005)131:3(336) this is a valid url but when i type or paste it in to a tomboy note the final ")" is not linkified and thus the url doesn't work. this is similar to the issue with spaces because it seems to fall back to tomboy needing a more nuanced or intelligent way of determining what characters are in and out.
I assume that is because you won't be able to parenthesize urls otherwise, eg: Bugzilla (http://bugzilla.gnome.org/)
related to MKE's and UWS's comments, perhaps a reserved set of characters for links could be a solution. for example, if the link is within " and " or < and > then all the text, including spaces and parentheses would be included in the link. another option would be a button or right-click option that allowed the user to edit the actual link location and/or change the range of text that the link controls. i'm thinking of how in html you can change the text in the href and between the a and /a and have them be the same (or different). the text editor in wordpress does this and so do word processors. if there is a work around for my ")" problem, i'm willing to try: http://dx.doi.org/10.1061/(ASCE)0733-9372(2005)131:3(336)
When dragging urls from nautilus to a Tomboy note, the inserted url could be simply escaped (eg. spaces to %20).
Dragging and dropping a link with a space it in works (I can click on the link in the note afterwards and the link opens properly). So, this problem isn't too serious. But, the user cannot modify the link manually and have the space/link be preserved correctly. Let's readdress this later (after 0.6.0).
to get that final ) in my url, escaping the ) to %29 works. it's ugly, but it works: http://dx.doi.org/10.1061/(ASCE)0733-9372(2005)131:3(336%29
Still valid with tomboy-0.6.3, also with local files linking I attach a screenshot Thanks a lot for trying to fix it :-)
Created attachment 95109 [details] tomboy-links.png
this issue is also present in 0.8.0... this is a show stopper for my specific usage since I use the application to link notes to my research reading.... Drag and drop from nautilus should provide a preserved link and does not break after inserting a space or a line break after it. :( What is needed to get this bug changed to confirmed?
Created attachment 102884 [details] Filesystem link errors in Tomboy and using Nautilus Screenshot of bugs and behavior with explanatory text captured in the Tomboy note itself.
(In reply to comment #13) > Created an attachment (id=102884) [edit] > Filesystem link errors in Tomboy and using Nautilus > > Screenshot of bugs and behavior with explanatory text captured in the Tomboy > note itself. > This bug occurs for me and makes this (potentially useful) aspect of Tomboy not consistently usable. On my system, I recreate the bug in the following ways (below). A detailed screenshot shows all the behavior I observed. The path: /home/kalin/Documents/This is all a directory name/This is a file name.txt is a valid file with some saved text in it. gedit is my default text editor. Tomboy 0.8.0 Nautilus 2.20.0 GNU/Linux: Ubuntu 7.10 distribution uname -a: Linux machname 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux Gnome Manually typed: /home/kalin - Works /home/kalin/Documents/This is all a directory name - Error (Cannot open location) /home/kalin/Documents/This%20is%20all%20a%20directory%20name - Works /home/kalin/Documents/This%11is%11all%11a%11directory%11name - Correctly Errors, but incorrectly underlines the whole link (not valid, non-existent dir with that name). /home/kalin/Documents/This%20is%20all%20a%20directory%20name/This%20is%20a%20file%20name.txt - Works, correct file is opened using gedit. Select a file in Nautilus, "copy", "paste" into Tomboy: /home/kalin/Documents/This is all a directory name/This is a file name.txt - Error (Cannot open location) Mouse drag a file from Nautilus into Tomboy, then press <space> or <enter> /home/kalin/Documents/This is all a directory name/This is a file name.txt - Error Mouse drag a file into Tomboy, then press NOTHING AT ALL, but click with the mouse on it or somewhere else: /home/kalin/Documents/This is all a directory name/This is a file name.txt (This and the following text were typed before creating the link directly above) If I do not press "space" or "Enter" or add any more text immediately following the above drag-and-dropped file name link, something peculiar happens: No error is reported, but gedit starts fresh with a blank, "Unsaved Document 1". That is the file it points to was not actually opened.
Created attachment 105796 [details] [review] URI-escape file paths so full links in notes will work. Committed to SVN Trunk (r1883).
Thanks a lot :-)