diff --git a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useAboutPanel.ts b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useAboutPanel.ts index fe2f246274..02a1bc358f 100644 --- a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useAboutPanel.ts +++ b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useAboutPanel.ts @@ -10,7 +10,9 @@ export const useAboutPanel = () => { const description = useMemo( () => projectMetadata?.description - ? wrapNonAnchorsInAnchor(projectMetadata?.description) + ? addHttpsToDescriptionUrls( + wrapNonAnchorsInAnchor(projectMetadata?.description), + ) : undefined, [projectMetadata?.description], ) @@ -20,3 +22,9 @@ export const useAboutPanel = () => { projectName: projectMetadata?.name, } } + +const addHttpsToDescriptionUrls = (description: string) => { + // find all dangling a hrefs missing a https:// or http:// or any protocol and add https:// + const urlRegex = /