diff --git a/assets/src/bundles/webapp/xss-filtering.js b/assets/src/bundles/webapp/xss-filtering.js --- a/assets/src/bundles/webapp/xss-filtering.js +++ b/assets/src/bundles/webapp/xss-filtering.js @@ -31,9 +31,15 @@ // used internal endpoint as image url to possibly get the image data // from the archive content - let url = Urls.browse_directory_resolve_content_path(swhObjectMetadata.directory); - url += `?path=${data.attrValue}`; - data.attrValue = url; + let directoryUrl = Urls.browse_directory_resolve_content_path(swhObjectMetadata.directory); + let path = data.attrValue; + // strip any query parameters appended to path + const url = new URL(window.location.origin + path); + if (url.search) { + path = path.replace(url.search, ''); + } + directoryUrl += `?path=${path}`; + data.attrValue = directoryUrl; } });