diff --git a/showcases/patternhub/components/version-switcher/version-switcher.tsx b/showcases/patternhub/components/version-switcher/version-switcher.tsx index 2290e317730..ed7a4489fe7 100644 --- a/showcases/patternhub/components/version-switcher/version-switcher.tsx +++ b/showcases/patternhub/components/version-switcher/version-switcher.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useRouter } from 'next/router'; -import { sanitize } from 'dompurify'; +import DOMPurify from 'dompurify'; import { DBSelect } from '../../../../output/react/src'; import { type BranchGroup, type GithubResponse } from './data'; @@ -108,7 +108,7 @@ const VersionSwitcher = () => { (branch.split('.').length === 3 && branch.startsWith('v')) || branch === 'latest'; window.location.replace( - sanitize( + DOMPurify.sanitize( `https://${owner}.github.io/${repo}${ isTag ? '/version' : '/review' }/${branch}${lastPath}`