#79 ✓invalid
Jeremy Lightsmith

Better handling of commandline arguments escaping

Reported by Jeremy Lightsmith | April 21st, 2008 @ 01:48 PM | in 1.2

Right now, CommandLine::execute() takes a command line (with all arguments included) and a "escape_quotes" flag. This is not good enough for consistent escaping of whitespace (which spaces are argument separators, and which are parts of the argument itself?) What it should be doing instead, is either take an array of command-line arguments, escape whitespace and quotes in them all, and concatenate using unescaped whitespace. Or, provide a method similar to h(), aka CGI::escape(), and let the method client worry about which parts need to be escaped and which shouldn't. --- "Postill, Robert" - 3/4/07 Unfortunately my initial tinkerings proved a little difficult as I use a file based svn repository which has spaces in the name. The initial download of the repository choked as the shellcommand misunderstood the spaces. So a little bit of fiddling later and I created the attached (very minor) patch (file and diff output).

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Tags

Pages