Message97454
I'm attaching a patch that changes quote() logic. It also fixes #7476, the empty argument case.
Strings with unsafe characters are now always quoted with single quotes. Single quotes themselves are replaced by a single quote in double quotes, so that
te$t'quoting
becomes
'te$t'"'"'quoting'
which I believe is portable across all commonly used shells.
(Another implementation would be to just backslash-quote all unsafe chars, but it makes for less readable results.)
Assigning to David for review -- you recently claimed to like shells :) |
|
Date |
User |
Action |
Args |
2010-01-09 10:25:27 | georg.brandl | set | recipients:
+ georg.brandl, tim.peters, eric.smith, r.david.murray, jjwiseman, bgertzfield |
2010-01-09 10:25:26 | georg.brandl | set | messageid: <1263032726.76.0.540199553315.issue7507@psf.upfronthosting.co.za> |
2010-01-09 10:25:25 | georg.brandl | link | issue7507 messages |
2010-01-09 10:25:25 | georg.brandl | create | |
|