Skip to content

Commit

Permalink
fixed links to open in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Shelly011s committed Feb 1, 2023
1 parent abfec11 commit 013e388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/helpers/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function stringToHTMLWithLinks(string: string) {
urlRegex,
'<a href="$1" target="_blank">$1</a>'
);
const sanitizedHtml = DOMPurify.sanitize(content);
const sanitizedHtml = DOMPurify.sanitize(content, { ADD_ATTR: ['target'] });
// eslint-disable-next-line react/no-danger
return <span dangerouslySetInnerHTML={{__html: sanitizedHtml}}/>;
}
Expand Down

0 comments on commit 013e388

Please sign in to comment.