Skip to content
Snippets Groups Projects
Commit d76ac42e authored by Liam Morlund's avatar Liam Morlund Committed by Kevin Kaland
Browse files

Issue #1356124: Escape characters properly.

parent 268e4993
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,6 @@ function escape_string($str) { ...@@ -31,7 +31,6 @@ function escape_string($str) {
return $str; return $str;
} }
function print_fields($info) { function print_fields($info) {
$fields = array(); $fields = array();
$str = ''; $str = '';
...@@ -39,7 +38,7 @@ function print_fields($info) { ...@@ -39,7 +38,7 @@ function print_fields($info) {
$arr = explode('.', $field); $arr = explode('.', $field);
$str .= '$fields'; $str .= '$fields';
foreach ($arr as $node) { foreach ($arr as $node) {
$str .= "['{$node}']"; $str .= "['" . escape_string($node) . "']";
} }
$str .= "='" . escape_string($val) . "';"; $str .= "='" . escape_string($val) . "';";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment