Skip to content

Commit

Permalink
UIOR-1340 DOMPurify import is incorrect (#1671)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx authored Nov 12, 2024
1 parent 41f0691 commit 6bcc087
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 7.1.0 (IN PROGRESS)

* import DOMPurify in right way. Refs UIOR-1340.

## [7.0.0](https://github.com/folio-org/ui-orders/tree/v7.0.0) (2024-11-01)
[Full Changelog](https://github.com/folio-org/ui-orders/compare/v6.0.4...v7.0.0)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';
import { sanitize } from 'dompurify';
import HtmlToReact, { Parser } from 'html-to-react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import DOMPurify from 'dompurify';

import {
Button,
Expand All @@ -27,7 +27,7 @@ const RoutingListConfigurationEmailTemplate = ({ listConfig, emailTemplate }) =>
processNode: processNodeDefinitions.processDefaultNode,
},
];
const purifyEmailTemplate = sanitize(emailTemplate);
const purifyEmailTemplate = DOMPurify.sanitize(emailTemplate);
const parsedEmailTemplate = parser.parseWithInstructions(purifyEmailTemplate, () => true, rules);
const [openPreview, setOpenPreview] = useState(false);

Expand Down

0 comments on commit 6bcc087

Please sign in to comment.