hard-code one bad case

This commit is contained in:
Shish 2020-03-13 10:04:12 +00:00
parent 5bebee7892
commit 7fa9d11512

View File

@ -93,6 +93,8 @@ class Tag
$tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag); # trailing slashes? $tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag); # trailing slashes?
$tag = trim($tag, ", \t\n\r\0\x0B"); $tag = trim($tag, ", \t\n\r\0\x0B");
if($tag == ".") $tag = ""; // hard-code one bad case...
if (mb_strlen($tag, 'UTF-8') > 255) { if (mb_strlen($tag, 'UTF-8') > 255) {
throw new ScoreException("The tag below is longer than 255 characters, please use a shorter tag.\n$tag\n"); throw new ScoreException("The tag below is longer than 255 characters, please use a shorter tag.\n$tag\n");
} }