diff --git a/frontend/app/src/bounties/BountyDescription.tsx b/frontend/app/src/bounties/BountyDescription.tsx index 90ab72e51..a5e1a5716 100644 --- a/frontend/app/src/bounties/BountyDescription.tsx +++ b/frontend/app/src/bounties/BountyDescription.tsx @@ -107,10 +107,10 @@ const BountyDescription = (props: BountiesDescriptionProps) => { useEffect(() => { if (props.description) { - const found = props?.description.match(/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/); + const found = props?.description.match(/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))(?![^`]*`)/); setReplitLink( props?.description.match( - /https?:\/\/(www\.)?[replit]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/ + /https?:\/\/(?:www\.)?(?:replit\.[a-zA-Z0-9()]{1,256}|replit\.it)\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/ ) ); setDescriptionImage(found && found.length > 0 && found[0]); diff --git a/frontend/app/src/people/widgetViews/summaries/WantedSummary.tsx b/frontend/app/src/people/widgetViews/summaries/WantedSummary.tsx index c3cf22a2d..be284be6b 100644 --- a/frontend/app/src/people/widgetViews/summaries/WantedSummary.tsx +++ b/frontend/app/src/people/widgetViews/summaries/WantedSummary.tsx @@ -86,7 +86,7 @@ function WantedSummary(props: WantedSummaryProps) { if (description) { setReplitLink( description.match( - /https?:\/\/(www\.)?[replit]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/ + /https?:\/\/(?:www\.)?(?:replit\.[a-zA-Z0-9()]{1,256}|replit\.it)\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/ ) ); }