Some more quoting (and unquoting) of quotes in variable used eg. as

button names: eg. "delete[$row_cont[path]]" with path containing " or '
- they need to get quoted for correct html markup
- etemplate_request::set_to_process() need to use unquoted version, as
  this is how it get returned in $_POST
This commit is contained in:
Ralf Becker
2010-05-11 14:52:45 +00:00
parent b161002ab4
commit 2d0c33bb90
2 changed files with 10 additions and 3 deletions

View File

@ -198,6 +198,9 @@ class etemplate_request
//echo '<p>'.__METHOD__."($form_name,$type,".array2string($data).")</p>\n";
$data['type'] = $type;
// unquote single and double quotes, as this is how they get returned in $_POST
$form_name = str_replace(array('\\\'','&quot;'),array('\'','"'),$form_name);
$this->data['to_process'][$form_name] = $data;
$this->data_modified = true;
}
@ -215,6 +218,9 @@ class etemplate_request
//echo '<p>'.__METHOD__."($form_name,$attribute,$value,$add_to_array)</p>\n";
if (!$form_name) return;
// unquote single and double quotes, as this is how they get returned in $_POST
$form_name = str_replace(array('\\\'','&quot;'),array('\'','"'),$form_name);
if ($add_to_array)
{
$this->data['to_process'][$form_name][$attribute][] = $value;