Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Fixed @ escape char check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kündig committed Feb 16, 2016
1 parent 1e69151 commit b723a56
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Offline/LocalCache/LocalCache.php
Expand Up @@ -114,14 +114,21 @@ public function getUrl($url)
}

$cacheObject = $this->cacheObjects[$url];

// External URL, contains a slash
if (strpos((string)$cacheObject, '/') !== false) {
return $cacheObject;
}

$urlObject = $cacheObject->getUrl();

// Return original URL for @-escaped objects
if($urlObject->replace === false) {
return (string)$urlObject;
}

$fullUrl = (string)$this->baseUrl . '/' . $cacheObject;
if($cacheObject->getUrl()->escape === true) {

if($urlObject->escape === true) {
$fullUrl = str_replace('/', '\/', $fullUrl);
}

Expand Down

0 comments on commit b723a56

Please sign in to comment.