aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2016-07-07 23:51:39 +0200
committerfilip <filip.komar@gmail.com>2016-07-07 23:51:39 +0200
commitfd785f3d32d0b299556890e9fa639d5cc1209019 (patch)
tree00f2acaeef5e8c7f9e9be8fbbbb3b1acb3c6b16b /langs.inc.php
parente9b2d6d6c51ac27413f09581b4647fbc782476be (diff)
downloadwww-fd785f3d32d0b299556890e9fa639d5cc1209019.tar
www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.gz
www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.bz2
www-fd785f3d32d0b299556890e9fa639d5cc1209019.tar.xz
www-fd785f3d32d0b299556890e9fa639d5cc1209019.zip
new function 'get sanitized string from $_GET'
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/langs.inc.php b/langs.inc.php
index c578dd2ee..bb412f2b8 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -139,6 +139,18 @@ function locale_underscore_to_hyphen($locale)
/**
+ * Returns sanitized specified $_GET variable by name if it exists and strip tags from it
+ *
+ * @param string name of a $_GET vaiable
+ *
+ * @return string sanitized string, empty on empty string or on error in filtering
+*/
+function get_sane_string($str){
+ return (string) filter_input(INPUT_GET, $str, FILTER_SANITIZE_STRING);
+}
+
+
+/**
*/
function show_langs($langs)
{