diff --git a/core/components/com_courses/models/assets/url.php b/core/components/com_courses/models/assets/url.php index b5a243d51d..0034d2facf 100644 --- a/core/components/com_courses/models/assets/url.php +++ b/core/components/com_courses/models/assets/url.php @@ -66,7 +66,7 @@ public function create() foreach ($urls as $url) { - if (!preg_match('/^(http[s]*\:\/\/)?([0-9A-Za-z\.\/\-\=\:\?\_\&\%\~\(\)]+)$/', $url, $matches)) + if (!preg_match('/^(http[s]*\:\/\/)?([0-9A-Za-z\.\/\-\=\:\?\_\&\%\~\(\)]+)((#[0-9A-Za-z_-]+)?)$/', $url, $matches)) { return array('error' => 'Content did not match the pre-defined filter'); }