diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0f50a6..defa7fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Change history for ui-circulation -## IN PROGRESS +## 10.0.0 IN PROGRESS * Move TLR enable settings to Circulation > General. Refs UICIRC-1038. * Create a new setting - Enable ECS title level requests. Refs UICIRC-1040. * Add view permissions for Circulation settings. Refs UICIRC-1056. +* Fix DOMPurify import. Refs UICIRC-1122. ## [9.2.0](https://github.com/folio-org/ui-circulation/tree/v9.2.0) (2024-10-30) [Full Changelog](https://github.com/folio-org/ui-circulation/compare/v9.1.0...v9.2.0) diff --git a/package.json b/package.json index bb365182..db547dfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@folio/circulation", - "version": "9.2.0", + "version": "10.0.0", "description": "Circulation manager", "repository": "folio-org/ui-circulation", "publishConfig": { diff --git a/src/settings/PatronNotices/components/ViewSections/PatronNoticeEmailSection/PatronNoticeEmailSection.js b/src/settings/PatronNotices/components/ViewSections/PatronNoticeEmailSection/PatronNoticeEmailSection.js index ddd8b68e..c6d3251a 100644 --- a/src/settings/PatronNotices/components/ViewSections/PatronNoticeEmailSection/PatronNoticeEmailSection.js +++ b/src/settings/PatronNotices/components/ViewSections/PatronNoticeEmailSection/PatronNoticeEmailSection.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import HtmlToReact, { Parser } from 'html-to-react'; -import { sanitize } from 'dompurify'; +import DOMPurify from 'dompurify'; import { Button, @@ -27,7 +27,7 @@ const PatronNoticeEmailSection = ({ notice, locale, emailTemplate }) => { } ]; const tokens = getTokens(locale); - const purifyEmailTemplate = sanitize(emailTemplate); + const purifyEmailTemplate = DOMPurify.sanitize(emailTemplate); const parsedEmailTemplate = parser.parseWithInstructions(purifyEmailTemplate, () => true, rules); const [openPreview, setOpenPreview] = useState(false); diff --git a/src/settings/StaffSlips/components/ViewSections/StaffSlipTemplateContentSection/StaffSlipTemplateContentSection.js b/src/settings/StaffSlips/components/ViewSections/StaffSlipTemplateContentSection/StaffSlipTemplateContentSection.js index b7ec1481..08e7d592 100644 --- a/src/settings/StaffSlips/components/ViewSections/StaffSlipTemplateContentSection/StaffSlipTemplateContentSection.js +++ b/src/settings/StaffSlips/components/ViewSections/StaffSlipTemplateContentSection/StaffSlipTemplateContentSection.js @@ -5,7 +5,7 @@ import { injectIntl, } from 'react-intl'; import HtmlToReact, { Parser } from 'html-to-react'; -import { sanitize } from 'dompurify'; +import DOMPurify from 'dompurify'; import { Button, @@ -36,7 +36,7 @@ const StaffSlipTemplateContentSection = ({ intl, staffSlip }) => { }, ]; const parser = new Parser(); - const purifyTemplate = sanitize(template); + const purifyTemplate = DOMPurify.sanitize(template); const parsedEmailTemplate = parser.parseWithInstructions(purifyTemplate, () => true, rules); const [openPreview, setOpenPreview] = useState(false); const togglePreviewDialog = () => {