mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 05:18:32 +01:00
Fix regex for windows paths + uppercase protocols
This also validates paths like `C:\sdf` instead of only `C:/sdf`. Also allows `HTTP://` instead of just `http://`
This commit is contained in:
parent
c8969fc264
commit
c41abc03bc
@ -595,7 +595,7 @@ class JavascriptRenderer
|
||||
return $uris;
|
||||
}
|
||||
|
||||
if (substr($uri, 0, 1) === '/' || preg_match('/^([a-z]+:\/\/|[a-zA-Z]:\/)/', $uri)) {
|
||||
if (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri)) {
|
||||
return $uri;
|
||||
}
|
||||
return rtrim($root, '/') . "/$uri";
|
||||
|
Loading…
x
Reference in New Issue
Block a user