strip style and improving stripping regex

pull/429/head
Ryan Tharp 6 years ago committed by Beaudan Brown
parent 93eb19bab5
commit a0e7ba252c

@ -31,8 +31,8 @@ export class Linkify extends React.Component<Props> {
<div
dangerouslySetInnerHTML={{
__html: text
.replace(/(<? *script)/gi, '')
.replace(/(<? *script)/gi, ''),
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, ''),
}}
/>
);

Loading…
Cancel
Save