added "-" to the allowed characters in sanatize method

This commit is contained in:
Christian Haschek
2015-11-06 15:35:08 +01:00
parent d9a95a4da1
commit 64c911306d

View File

@@ -2,9 +2,18 @@
class HTML { class HTML {
/*
* Characters that will pass:
* a-z
* A-Z
* 0-9
* .
* _
* -
*/
function sanatizeString($string) function sanatizeString($string)
{ {
return preg_replace("/[^a-zA-Z0-9._]+/", "", $string); return preg_replace("/[^a-zA-Z0-9._\-]+/", "", $string);
} }
function renderSize($byte) function renderSize($byte)