Skip to content

Commit

Permalink
Quick hack for supporting /pub/ in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Sep 22, 2023
1 parent 2f468b7 commit e012c3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fix issue where image is not replaced with `img` tag opening plus newline
- Field in admin is `cache_directory_path` instead of `cache_directory` #154
- Quick hack for supporting `/pub/` in URLs

## [0.4.1] - 15 August 2023
### Fixed
Expand Down
1 change: 1 addition & 0 deletions Util/UrlConvertor.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public function getFilenameFromUrl(string $url): string
{
$url = (string)$this->escaper->escapeHtml($url);
$url = preg_replace('/\/static\/version(\d+\/)/', '/static/', $url);
$url = str_replace('/pub/', '/', $url);
$url = $this->normalizeUrl($url);

if ($this->isLocal($url) === false) {
Expand Down

0 comments on commit e012c3f

Please sign in to comment.