|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-09-03 13:05 UTC] 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'
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 16:00:01 2025 UTC |
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.