diff --git a/src/render/instantview.ts b/src/render/instantview.ts index a7458cd..0449157 100644 --- a/src/render/instantview.ts +++ b/src/render/instantview.ts @@ -69,7 +69,7 @@ const formatDate = (date: Date, language: string): string => { }; const htmlifyLinks = (input: string): string => { - const urlPattern = /\bhttps?:\/\/[\w.-]+\.\w+[/\w.-]*\w/g; + const urlPattern = /\bhttps?:\/\/(\w+(-\w+)*\.)+[a-z]{2,}(:\d+)?(\/[-\w@:%_+.~#?&/=]*)?/gi; return input.replace(urlPattern, url => { return `${url}`; });