fix(fetchers/tags.php.liquid): allow for . characters in tag names and use less abrupt error view
This commit is contained in:
parent
6fdc0b56b9
commit
1af90c14ad
3 changed files with 5 additions and 6 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"html-minifier-terser": "7.2.0",
|
"html-minifier-terser": "7.2.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -27,9 +27,8 @@ if (isset($matches[2]) && (int)$matches[2] === 1) {
|
||||||
|
|
||||||
$tag = strtolower(urldecode($matches[1]));
|
$tag = strtolower(urldecode($matches[1]));
|
||||||
|
|
||||||
if (!preg_match('/^[\p{L}\p{N} _\-]+$/u', $tag)) {
|
if (!preg_match('/^[\p{L}\p{N} _\.\-]+$/u', $tag)) {
|
||||||
http_response_code(400);
|
echo file_get_contents(__DIR__ . "/../404/index.html");
|
||||||
echo "Invalid tag";
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue