#45981 [Opn->Bgs]: function escapeshellarg excessively quotes single quotes

From: Date: Wed, 03 Sep 2008 13:39:29 +0000
Subject: #45981 [Opn->Bgs]: function escapeshellarg excessively quotes single quotes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128645@lists.php.net to get a copy of this message
ID: 45981 Updated by: pajoye@php.net Reported By: jeroen at asystance dot nl -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: debian linux PHP Version: 5.2CVS-2008-09-03 (snap) New Comment: How is it supposed to know that the string argument is already escaped? What is done in your example is not different than: print_r(escapeshellarg(escapeshellarg("single ' quote"))); Not a bug. Previous Comments: ------------------------------------------------------------------------ [2008-09-03 13:05:10] jeroen at asystance dot nl Description: ------------ escapeshellarg inserts single quotes (') before and after an escaped single quote I observed the bug in 5.2.6-3 and the php5.3-200809031030 CVS snapshot Reproduce code: --------------- <?php echo escapeshellarg("single ' quote") . "\n"; echo escapeshellarg('single \' quote') . "\n"; ?> Expected result: ---------------- 'single \' quote' 'single \' quote' Actual result: -------------- 'single '\'' quote' 'single '\'' quote' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45981&edit=1

« previous php.bugs (#128645) next »