From 53cd9fd77e7961ff6757f2231e52c1d159c98ab2 Mon Sep 17 00:00:00 2001 From: sasse Date: Wed, 15 May 2024 08:24:56 +0200 Subject: [PATCH] fix(SearchResults): encode IRI --- package.json | 4 ++-- .../widgets/SearchResultsListWidget/MetadataCompact.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 63952995..bc2412b2 100644 --- a/package.json +++ b/package.json @@ -54,13 +54,13 @@ "@storybook/react-webpack5": "^7.6.7", "@storybook/storybook-deployer": "^2.8.16", "@storybook/testing-library": "^0.2.2", + "@ts4nfdi/esbuild-dynamic-import": "2.0.1", + "@ts4nfdi/gh-pages-multi": "^0.7.9", "@types/node": "^17.0.36", "@types/react": "^17.0.45", "@types/react-dom": "17.0.11", "@typescript-eslint/eslint-plugin": "^5.33.0", "@typescript-eslint/parser": "^5.33.0", - "@ts4nfdi/esbuild-dynamic-import": "2.0.1", - "@ts4nfdi/gh-pages-multi": "^0.7.9", "@zbmed/ols-treeview": "^4.1.7", "axios": "^1.1.2", "cross-env": "^7.0.3", diff --git a/src/components/widgets/SearchResultsListWidget/MetadataCompact.tsx b/src/components/widgets/SearchResultsListWidget/MetadataCompact.tsx index 8a4e861e..ad325fdd 100644 --- a/src/components/widgets/SearchResultsListWidget/MetadataCompact.tsx +++ b/src/components/widgets/SearchResultsListWidget/MetadataCompact.tsx @@ -18,7 +18,7 @@ function MetadataCompact(props: MetadataCompactProps) { {...rest} href={targetLink ? (result.type != "ontology" ? - targetLink + "ontologies/" + result.ontology_name + "/" + pluralizeType(result.type, true) + "?iri=" + result.iri + targetLink + "ontologies/" + result.ontology_name + "/" + pluralizeType(result.type, true) + "?iri=" + encodeURIComponent(result.iri) : targetLink + "ontologies/" + result.ontology_name) : undefined} title={