fix(fetchers/tags.php.liquid): allow for . characters in tag names and use less abrupt error view

This commit is contained in:
Cory Dransfeldt 2025-04-17 06:34:48 -07:00
parent 6fdc0b56b9
commit 1af90c14ad
No known key found for this signature in database
3 changed files with 5 additions and 6 deletions

View file

@ -27,9 +27,8 @@ if (isset($matches[2]) && (int)$matches[2] === 1) {
$tag = strtolower(urldecode($matches[1]));
if (!preg_match('/^[\p{L}\p{N} _\-]+$/u', $tag)) {
http_response_code(400);
echo "Invalid tag";
if (!preg_match('/^[\p{L}\p{N} _\.\-]+$/u', $tag)) {
echo file_get_contents(__DIR__ . "/../404/index.html");
exit();
}