From 64c911306d7da86ff1c969cd737dbf4fd5e560e0 Mon Sep 17 00:00:00 2001 From: Christian Haschek Date: Fri, 6 Nov 2015 15:35:08 +0100 Subject: [PATCH] added "-" to the allowed characters in sanatize method --- classes/html.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classes/html.php b/classes/html.php index 03ff4a5..e2d7c13 100644 --- a/classes/html.php +++ b/classes/html.php @@ -2,9 +2,18 @@ class HTML { + /* + * Characters that will pass: + * a-z + * A-Z + * 0-9 + * . + * _ + * - + */ function sanatizeString($string) { - return preg_replace("/[^a-zA-Z0-9._]+/", "", $string); + return preg_replace("/[^a-zA-Z0-9._\-]+/", "", $string); } function renderSize($byte)