diff --git a/openbas-front/eslint.config.js b/openbas-front/eslint.config.js index 2dee5f31a2..ebd8db5abc 100644 --- a/openbas-front/eslint.config.js +++ b/openbas-front/eslint.config.js @@ -42,7 +42,6 @@ export default [ 'import/resolver': 'oxc', 'import/ignore': [ 'react-apexcharts', // ignore react-apexcharts as the default export is broken - 'dompurify', ], }, }, diff --git a/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js b/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js index 44356cb3a5..38523d01ae 100644 --- a/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js +++ b/openbas-front/src/admin/components/simulations/simulation/mails/Communication.js @@ -2,7 +2,7 @@ import { AttachFileRounded, ExpandLess, ExpandMore } from '@mui/icons-material'; import { Avatar, Button, Card, CardContent, CardHeader, IconButton } from '@mui/material'; import { lightBlue } from '@mui/material/colors'; import { makeStyles, useTheme } from '@mui/styles'; -import DOMPurify from 'dompurify'; +import { sanitize } from 'dompurify'; import parse from 'html-react-parser'; import { useState } from 'react'; @@ -134,8 +134,8 @@ const Communication = (props) => { {isHtml ? (
{expand - ? parse(DOMPurify.sanitize(content)) - : parse(DOMPurify.sanitize(truncate(content, limit)))} + ? parse(sanitize(content)) + : parse(sanitize(truncate(content, limit)))}
) : (