aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 6f2caa510..167fbb1df 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1798,9 +1798,11 @@ function magic_link($s) {
return $s;
}
-function stringify_array_elms(&$arr) {
+// if $escape is true, dbesc() each element before adding quotes
+
+function stringify_array_elms(&$arr,$escape = false) {
for($x = 0; $x < count($arr); $x ++)
- $arr[$x] = "'" . $arr[$x] . "'";
+ $arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
}
/**