Re: [Usability] [gnome-terminal] escaping special characters on dnd



On So, 2006-07-30 at 15:25 -0400, eigenlambda wrote:
> Hello, I am new here, and unsure as to whether this is the right list
> to post this to?  I have a feature request, and a trivial patch which
> implements it.

Feature requests go to bugzilla.gnome.org . Feel free to open a bug
report (that's the way to ask for a feature) and attach the patch.

> In gnome-terminal, for anyone who does not already use this feature,
> when a user drags something into a terminal window, the URI is copied
> into the terminal.  Local filenames are even converted from full
> "file://" URIs to simple path names.  This is a really cool feature.
> 
> However, many filenames in the wild have evil characters such as
> !#&*()[]{}"'`<>,; and whitespace.  If, for example, you were to
> download a .torrent from mininova.org, and then type 'azureus ' into
> the terminal and try to drag and drop the filename, bash would
> complain about the characters in that filename.
> 
> The solution is to escape those characters before inserting the
> filename.  Attached is a patch to do this.
> 
> Potential bugs-
> This may or may not be the right list of special characters for other
> shells than bash.  It might not even be complete for bash itself.
> This is obviously wrong if bash is not the program recieving input.  I
> don't know to to see if a shell is recieving input, however.

I think this is a good thing to do (so feel free to send a private email
including a link to the bug report so I can CC this bug). But there is a
function in glib that can perform shell escaping (just search for it).
You should use that function.

Regards,
  Sven




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]