Banned a few characters from usage in tags

This commit is contained in:
Marcin Kurczewski 2014-11-09 15:26:48 +01:00
parent 61317d8b4d
commit ad8b235bb8

View file

@ -88,10 +88,10 @@ class Validator
throw new \DomainException('Tags cannot be empty.'); throw new \DomainException('Tags cannot be empty.');
//<> causes HTML injection and problems with Markdown. //<> causes HTML injection and problems with Markdown.
//\/ causes problems with URLs. //\/?& causes problems with URLs.
//; causes problems with search argument parsing in JS frontend. //#; causes problems with search argument parsing in JS frontend.
//whitespace causes problems with search. //whitespace causes problems with search.
$illegalCharacters = str_split("<>;\\/\r\n\t " . chr(160)); $illegalCharacters = str_split("<>#;\\/?&\r\n\t " . chr(160));
foreach ($tags as $tag) foreach ($tags as $tag)
{ {
if (empty($tag)) if (empty($tag))