note 7210 deleted from function.ereg-replace by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:49:06 +0000 |
| Subject: | note 7210 deleted from function.ereg-replace by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20190@lists.php.net to get a copy of this message | ||
// Remove a leading backslash from a single quote to restore
// the original form field's value. (PHP does unwanted quoting.)
$Field[$Key] = ($Value = ereg_replace('\\\\\'', '\'', &$Value));
//$Param .= '{' . $Key . ' "' . addcslashes($Value, '"') .
'"} ';
// A quote must be replaced by a "quote" to get a quote with a leading backslash.
// Each single quote must be quoted in a special way to prevent the shell to execute commands in a
parameter string.
$Param .= '{' . $Key . ' "'
. ereg_replace('\'', '\'"\'"\'',
ereg_replace('"', '"', &$Value))
. '"} ';