Version: v0.9.5 (using KDE 3.1.0 (RC5)) Installed from: Mandrake Linux Cooker i586 - Cooker Compiler: gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk) OS: Linux (i686) release 2.4.19-16mdk Highlight a link on a term (konsole, xterm). Klipper pops up window to open the link. Open the link in konqueror. The link opened now has an extra "%20" added at the end. Naturally, that link is not a valid link which means the very purpose of opening the link is defeated. One has to manually delete these extra characters to correct the link and then load it.
Subject: Re: New: Extra "%20" added at the end of links On Sunday 29 December 2002 00:15, you wrote: > Highlight a link on a term (konsole, xterm). Klipper pops up window to open > the link. Open the link in konqueror. The link opened now has an extra > "%20" added at the end. Naturally, that link is not a valid link which > means the very purpose of opening the link is defeated. One has to manually > delete these extra characters to correct the link and then load it. Are you sure the %20 appears when highlighting a URL in konsole and not in khtml (konqueror, kmail, ...)? Or maybe it happened that you marked not only the URL but some extra space. In that case you may want to use the handy double-click feature of konsole (and probably any other terminal): double-click the URL and if necessary, move the mouse to the rest of the URL if not everything was selected by the double-click (still holding down the mousebutton). Klipper surely doesn't add anything to the selected text. Cheers Carsten Pfeiffer -----BEGIN PGP SIGNATURE----- iQEVAwUBPg7PRaWgYMJuwmZtAQH8kQgAj8ISSLl0OJZeXYZsMMhNe2FMgJ0emjmA TY8Ei4eGhlIVCJ52O9aIbYUhfLup39eL+l5Z4aKA9b6/YDtDp73bAQ9n/ut3b260 hbu741WWxotUGCvo2RqvfEl4EIz0kqb/+HL2Fk7DE85ZhD0zNbNUtnkv1x1yN6Xv tyyxrmlXmaQSlkaFfEzWs58d9HUQN1Hf2OUTjzF3TXEXvQJCr0XhJHXMN4XHZYkV XrY5Uf7+WrtxdnwC+MaUypWjMSWAuvVhePuJgbKMotz2wVX2QqmujYutukeHYEUD 1cBot/3eKvo1u4FzZIrMzsk5jsNc0hRYE+X1HaB3wptXr7kx8o4mdA== =ScKW -----END PGP SIGNATURE-----
Subject: Re: Extra "%20" added at the end of links On 29 Dec 2002, Carsten Pfeiffer wrote: > ------- Additional Comments From carpdjih@mailbox.tu-berlin.de 2002-12-29 11:34 ------- > Subject: Re: New: Extra "%20" added at the end of links > > On Sunday 29 December 2002 00:15, you wrote: > > > Highlight a link on a term (konsole, xterm). Klipper pops up window to open > > the link. Open the link in konqueror. The link opened now has an extra > > "%20" added at the end. Naturally, that link is not a valid link which > > means the very purpose of opening the link is defeated. One has to manually > > delete these extra characters to correct the link and then load it. > > Are you sure the %20 appears when highlighting a URL in konsole and not in > khtml (konqueror, kmail, ...)? konsole > Or maybe it happened that you marked not only > the URL but some extra space. Ur guess is right. The "%20" is added only when there is an extra space at the end, not otherwise. > In that case you may want to use the handy > double-click feature of konsole (and probably any other terminal): > > double-click the URL and if necessary, move the mouse to the rest of the URL > if not everything was selected by the double-click (still holding down the > mousebutton). Thats what I do but there is always a chance of overshoot when u move the mouse to the rest of the URL (which adds the extra space at the end). > > Klipper surely doesn't add anything to the selected text. Can klipper subtract the extra terminal space from selections that start with http/s, ftp/s, file etc. ? > > Cheers > Carsten Pfeiffer
> Can klipper subtract the extra terminal space from selections that start > with http/s, ftp/s, file etc. ? It could do that optionally, yes. Well, it's a quick fix, so there it is in CVS now. (will be in the next major version after 3.1, because it added new strings to be translated).
This is nice, but I would like to see it extended. Often I read messages in e-mail or news which have URLs which are broken by the poster or the quoting. I have worked around it by making my own wrapper, but it would be nice if Klipper did it automatically. After all, newline, space and ">" are illegal in URLs. Here it is, it's quite simple :-) #! /usr/bin/perl # Remove line breaks. Also remove a trailing backslash before the linebreak # (e.g. emacs -nw), leading whitespace, and ">" (quoted e-mail). $ARGV[0] =~ s/\\?\n[\s>]*//; exec "kfmclient", "exec", @ARGV; now, you could argue that it's not clean to make such a modification for %s depending on the pattern, and that kfmclient should do it instead, and I would agree. perhaps a %u (for URL) could be introduced instead.