1
0
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:
Barry vd. Heuvel 2014-09-03 15:00:51 +02:00
parent c8969fc264
commit c41abc03bc

View File

@ -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";