summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-02-19 16:55:36 +0300
committerAndrew Dolgov <[email protected]>2011-02-19 16:55:36 +0300
commitc7a8deacd97242e33a1d4111ccd1da6810d28255 (patch)
tree5fc930eebd1d3cbc3fc0ec8876420d73ccf1e971 /db.php
parent685352116602e42b23484119f1fde5c6b7fef594 (diff)
db_escape_string: remove tags by default (refs #323)
Diffstat (limited to 'db.php')
-rw-r--r--db.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/db.php b/db.php
index 844bd0e41..9b1ce5d84 100644
--- a/db.php
+++ b/db.php
@@ -41,7 +41,9 @@ function db_connect($host, $user, $pass, $db) {
}
}
-function db_escape_string($s) {
+function db_escape_string($s, $strip_tags = true) {
+ if ($strip_tags) $s = strip_tags($s);
+
if (DB_TYPE == "pgsql") {
return pg_escape_string($s);
} else {