diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2025-10-26 08:13:16 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2025-10-26 08:13:16 -0300 |
| commit | 2e7d0848e27e9074e2fb2d4b9844ece91684dbad (patch) | |
| tree | c88c5e3cf23e4634cb5008ee0bc47ab9312877b0 /src | |
| parent | 3ffa655de14ba931e213dd9f3ea1483dec1cd593 (diff) | |
content: image: uri-decode mediaSrc
Diffstat (limited to 'src')
| -rw-r--r-- | src/content/dependencies/image.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index d979b0bc..aacf2fed 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -108,12 +108,11 @@ export default { // src string directly when a parts-formed path *is* available seems wrong. // It should be possible to do urls.from(slots.path[0]).to(...slots.path), // for example, but will require reworking the control flow here a little. - let mediaSrc = null; + let mediaSrc = decodeURIComponent(originalSrc); if (originalSrc.startsWith(to('media.root'))) { - mediaSrc = - originalSrc - .slice(to('media.root').length) - .replace(/^\//, ''); + mediaSrc = mediaSrc + .slice(to('media.root').length) + .replace(/^\//, ''); } const isMissingImageFile = |