From f30e4a82ca11bb791a4ecdc9dbad11e7b4444df2 Mon Sep 17 00:00:00 2001 From: gestchild Date: Mon, 11 Nov 2024 17:02:39 +0000 Subject: [PATCH] stop unicode characters printing to page --- content/webapp/components/Tags/Tags.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/webapp/components/Tags/Tags.tsx b/content/webapp/components/Tags/Tags.tsx index eaabb56726..b29a23a303 100644 --- a/content/webapp/components/Tags/Tags.tsx +++ b/content/webapp/components/Tags/Tags.tsx @@ -26,6 +26,8 @@ type PartWithSeparatorProps = { $isLast: boolean; }; +const nbsp = '\\00a0'; + const PartWithSeparator = styled.span.attrs({ className: font('intr', 5), })` @@ -33,7 +35,7 @@ const PartWithSeparator = styled.span.attrs({ display: ${props => (props.$isLast ? 'none' : 'inline')}; /* non-breaking space (\u00A0) keeps characters that would otherwise break (e.g. hyphens) stuck to the preceding text */ - content: '\u00A0${props => props.$separator}\u00A0'; + content: '${nbsp}${props => props.$separator}${nbsp}'; } `;