This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bgertzfield
Recipients bgertzfield, eric.smith, jjwiseman, tim.peters
Date 2009-12-14.21:48:28
SpamBayes Score 1.4115481e-10
Marked as misclassified No
Message-id <1260827310.19.0.583545445855.issue7507@psf.upfronthosting.co.za>
In-reply-to
Content
The undocumented (but unit tested!) pipes.quote does not correctly 
escape '!', which cannot be passed to the shell outside of single-
quotes:

sh-3.2$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pipes
>>> pipes.quote("omgshoes!")
'omgshoes!'

sh-3.2$ echo "omgshoes!"
sh: !": event not found

bash-3.2$ echo "omgshoes!"
bash: !": event not found

zsh-4.3.9% echo "omgshoes!"
dquote> 

This needs to be single-quoted for safety:

sh-3.2$ echo 'omgshoes!'
omgshoes!
bash-3.2$ echo 'omgshoes!'
omgshoes!
zsh-4.3.9% echo 'omgshoes!'
omgshoes!
History
Date User Action Args
2009-12-14 21:48:30bgertzfieldsetrecipients: + bgertzfield, tim.peters, eric.smith, jjwiseman
2009-12-14 21:48:30bgertzfieldsetmessageid: <1260827310.19.0.583545445855.issue7507@psf.upfronthosting.co.za>
2009-12-14 21:48:29bgertzfieldlinkissue7507 messages
2009-12-14 21:48:28bgertzfieldcreate