Skip to content

Commit

Permalink
Backport c4a7de6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Dec 17, 2024
1 parent ab44117 commit dda033d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft CMS 4

## Unreleased

- Fixed a bug where asset edit page URLs contained spaces if the asset filename contained spaces. ([#15236](https://github.com/craftcms/cms/issues/15236))

## 4.13.7 - 2024-12-17

- Fixed a bug where elements’ `getPrev()` and `getNext()` methods could cause duplicate queries. ([#16329](https://github.com/craftcms/cms/discussions/16329))
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ protected function cpEditUrl(): ?string
return null;
}

$filename = $this->getFilename(false);
$filename = preg_replace('/\s+/', '-', $this->getFilename(false));
$path = "assets/edit/$this->id-$filename";

return UrlHelper::cpUrl($path);
Expand Down

0 comments on commit dda033d

Please sign in to comment.