diff --git a/gradle/changelog/filename_with_hash.yaml b/gradle/changelog/filename_with_hash.yaml new file mode 100644 index 0000000000..6c9b631263 --- /dev/null +++ b/gradle/changelog/filename_with_hash.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Repository viewer filename with hash ([#1766](https://github.com/scm-manager/scm-manager/issues/1766) and [#1776](https://github.com/scm-manager/scm-manager/pull/1776)) diff --git a/scm-ui/ui-components/src/Breadcrumb.tsx b/scm-ui/ui-components/src/Breadcrumb.tsx index 3d6ca53cc8..dede02a2e5 100644 --- a/scm-ui/ui-components/src/Breadcrumb.tsx +++ b/scm-ui/ui-components/src/Breadcrumb.tsx @@ -144,7 +144,7 @@ const Breadcrumb: FC = ({ return (
  • - {pathFragment} + {decodeURIComponent(pathFragment)}
  • ); @@ -156,7 +156,7 @@ const Breadcrumb: FC = ({ title={pathFragment} to={baseUrl + "/" + encodeURIComponent(revision) + "/" + currPath} > - {pathFragment} + {decodeURIComponent(pathFragment)} ); diff --git a/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx b/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx index cf07fca8d1..6ac71a3f9d 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx @@ -54,7 +54,7 @@ export const createRelativeLink = (repositoryUrl: string) => { export const createFolderLink = (base: string, file: File) => { let link = base; if (file.path) { - let path = file.path; + let path = file.path.split("/").map(encodeURIComponent).join("/"); if (path.startsWith("/")) { path = path.substring(1); }