diff --git a/CHANGELOG.md b/CHANGELOG.md index 407ce5070..06b62e8b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ You can also check the - Add Sentry integration back - Refactoring - Incorporate the Swiss-Federal-CI library into this repository. +- Fixes + - Sanitize urls for links in tables - Maintenance - Set Maptiler API key from `MAPTILER_API_KEY` environment variable at runtime, to avoid having to rebuild the application when the key is rotated diff --git a/app/charts/table/linked-cell-wrapper.tsx b/app/charts/table/linked-cell-wrapper.tsx index 98ee85e23..e9e1dc6da 100644 --- a/app/charts/table/linked-cell-wrapper.tsx +++ b/app/charts/table/linked-cell-wrapper.tsx @@ -1,3 +1,4 @@ +import { sanitizeUrl } from "@braintree/sanitize-url"; import { Link, Theme } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { ReactNode } from "react"; @@ -39,7 +40,7 @@ const getLinkHref = ( ? `${iriValue}`.split("/").pop() || iriValue : rawValue; - return `${baseUrl}${value}`; + return sanitizeUrl(`${baseUrl}${value}`); }; export const LinkedCellWrapper = ({