diff --git a/client/src/javascript/components/general/LinkedText.tsx b/client/src/javascript/components/general/LinkedText.tsx index 66484276a..81cf60929 100644 --- a/client/src/javascript/components/general/LinkedText.tsx +++ b/client/src/javascript/components/general/LinkedText.tsx @@ -6,7 +6,7 @@ interface LinkedTextProps { } function isValidHttpUrl(s: string) { - var url; + let url; try { url = new URL(s); @@ -20,7 +20,7 @@ function isValidHttpUrl(s: string) { const LinkedText: FC = ({text, className}: LinkedTextProps) => { const nodes = text.split(/(?<=\s)(?!\s)(?:\b|\B)/).map((s) => isValidHttpUrl(s.trimEnd()) ? ( - + {s} ) : (