diff --git a/changelog/unreleased/bugfix-space-image-not-shown-if-name-contains-blanks b/changelog/unreleased/bugfix-space-image-not-shown-if-name-contains-blanks new file mode 100644 index 00000000000..a11bdae326e --- /dev/null +++ b/changelog/unreleased/bugfix-space-image-not-shown-if-name-contains-blanks @@ -0,0 +1,4 @@ +Bugfix: Space image not shown if file name contains blanks + +https://github.com/owncloud/web/pull/6881 +https://github.com/owncloud/web/issues/6874 diff --git a/packages/web-app-files/src/helpers/resources.ts b/packages/web-app-files/src/helpers/resources.ts index 27f39db9d7b..d0535b3b748 100644 --- a/packages/web-app-files/src/helpers/resources.ts +++ b/packages/web-app-files/src/helpers/resources.ts @@ -120,6 +120,14 @@ export function buildSpace(space) { if (space.special) { spaceImageData = space.special.find((el) => el.specialFolder.name === 'image') spaceReadmeData = space.special.find((el) => el.specialFolder.name === 'readme') + + if (spaceImageData) { + spaceImageData.webDavUrl = decodeURI(spaceImageData.webDavUrl) + } + + if (spaceReadmeData) { + spaceReadmeData.webDavUrl = decodeURI(spaceReadmeData.webDavUrl) + } } if (space.root?.permissions) {