diff --git a/code/ui/blocks/src/blocks/Subheading.tsx b/code/ui/blocks/src/blocks/Subheading.tsx index 02f35bf63fdf..57cf5223be51 100644 --- a/code/ui/blocks/src/blocks/Subheading.tsx +++ b/code/ui/blocks/src/blocks/Subheading.tsx @@ -8,7 +8,7 @@ export const Subheading: FC> = ({ children, disa if (disableAnchor || typeof children !== 'string') { return

{children}

; } - const tagID = children.toLowerCase().replace(/[^a-z0-9]/gi, '-'); + const tagID = globalThis.encodeURIComponent(children.toLowerCase()); return ( {children}