mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
Uri extension set for specific types only rather than all
This commit is contained in:
@@ -82,7 +82,7 @@ class Uri
|
||||
|
||||
// remove the extension if there is one set
|
||||
$parts = pathinfo($uri);
|
||||
if (strpos($parts['basename'], '.')) {
|
||||
if (preg_match("/\.(txt|xml|html|json|rss|atom)$/", $parts['basename'])) {
|
||||
$uri = rtrim($parts['dirname'], '/').'/'.$parts['filename'];
|
||||
$this->extension = $parts['extension'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user