mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update regex to only match files with names
This commit is contained in:
parent
d119272b92
commit
705d342080
@ -131,7 +131,7 @@ class SS_HTTPRequest implements ArrayAccess {
|
||||
if(Director::is_relative_url($url) || preg_match('/^\//', $url)) {
|
||||
$this->url = preg_replace(array('/\/+/','/^\//', '/\/$/'),array('/','',''), $this->url);
|
||||
}
|
||||
if(preg_match('/^(.*)\.([A-Za-z][A-Za-z0-9]*)$/', $this->url, $matches)) {
|
||||
if(preg_match('/^(.+)\.([A-Za-z][A-Za-z0-9]*)$/', $this->url, $matches)) {
|
||||
$this->url = $matches[1];
|
||||
$this->extension = $matches[2];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user