diff --git a/CHANGELOG.md b/CHANGELOG.md index e1ebd5ba4..e2a8cb067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Add more controls over HTML5 video attributes (autoplay, poster, loop controls) [#1442](https://github.com/getgrav/grav/pull/1442) 1. [](#bugfix) * Fix to force route/redirect matching from the start of the route by default [#1446](https://github.com/getgrav/grav/issues/1446) + * Edit check for valid slug [#1459](https://github.com/getgrav/grav/issues/1459) # v1.2.4 ## 04/24/2017 diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 41e177cf0..c6cf85e77 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1497,7 +1497,7 @@ class Page { if ($var !== null && $var !== "") { $this->slug = $var; - if (!preg_match('/^[a-z0-9][-a-z0-9]*$/', $this->slug)) { + if (!preg_match('/^[a-zA-Zа-яA-Я0-9][a-zA-Zа-яA-Я0-9_\-]*$/', $this->slug)) { Grav::instance()['log']->notice("Invalid slug set in YAML frontmatter: " . $this->rawRoute() . " => " . $this->slug); } }