Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend] Update dependency dompurify to v3.2.3 #2082

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openbas-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"cronstrue": "2.51.0",
"d3-hierarchy": "3.1.2",
"date-fns": "4.1.0",
"dompurify": "3.1.6",
"dompurify": "3.2.3",
"elkjs": "0.9.3",
"final-form": "4.20.10",
"final-form-arrays": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 purify from 'dompurify';
import parse from 'html-react-parser';
import { useState } from 'react';

Expand Down Expand Up @@ -134,8 +134,8 @@ const Communication = (props) => {
{isHtml ? (
<div style={{ marginTop: -5 }}>
{expand
? parse(DOMPurify.sanitize(content))
: parse(DOMPurify.sanitize(truncate(content, limit)))}
? parse(purify.sanitize(content))
: parse(purify.sanitize(truncate(content, limit)))}
</div>
) : (
<div style={{ marginTop: -5, whiteSpace: 'pre-line' }}>
Expand Down
22 changes: 17 additions & 5 deletions openbas-front/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3182,6 +3182,13 @@ __metadata:
languageName: node
linkType: hard

"@types/trusted-types@npm:^2.0.7":
version: 2.0.7
resolution: "@types/trusted-types@npm:2.0.7"
checksum: 10c0/4c4855f10de7c6c135e0d32ce462419d8abbbc33713b31d294596c0cc34ae1fa6112a2f9da729c8f7a20707782b0d69da3b1f8df6645b0366d08825ca1522e0c
languageName: node
linkType: hard

"@types/unist@npm:*, @types/unist@npm:^3.0.0":
version: 3.0.3
resolution: "@types/unist@npm:3.0.3"
Expand Down Expand Up @@ -4989,10 +4996,15 @@ __metadata:
languageName: node
linkType: hard

"dompurify@npm:3.1.6":
version: 3.1.6
resolution: "dompurify@npm:3.1.6"
checksum: 10c0/3de1cca187c78d3d8cb4134fc2985b644d6a81f6b4e024c77cfb04c1c2f38544ccf7b0ea37a48ce22fcca64594170ed7c22252574c75b801c44345cdd7b06c64
"dompurify@npm:3.2.3":
version: 3.2.3
resolution: "dompurify@npm:3.2.3"
dependencies:
"@types/trusted-types": "npm:^2.0.7"
dependenciesMeta:
"@types/trusted-types":
optional: true
checksum: 10c0/0ce5cb89b76f396d800751bcb48e0d137792891d350ccc049f1bc9a5eca7332cc69030c25007ff4962e0824a5696904d4d74264df9277b5ad955642dfb6f313f
languageName: node
linkType: hard

Expand Down Expand Up @@ -8954,7 +8966,7 @@ __metadata:
cross-env: "npm:7.0.3"
d3-hierarchy: "npm:3.1.2"
date-fns: "npm:4.1.0"
dompurify: "npm:3.1.6"
dompurify: "npm:3.2.3"
elkjs: "npm:0.9.3"
esbuild: "npm:0.24.0"
eslint: "npm:9.15.0"
Expand Down
Loading