From 5b778589d80a47489160904a3abc44246b927489 Mon Sep 17 00:00:00 2001 From: adarleyjrr <50996706+adarleyjrr@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:18:31 -0400 Subject: [PATCH] fix: for links in htmlparsedcontent component --- CHANGELOG.md | 2 ++ package-lock.json | 2 +- src/utils/wysiwyg.tsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4765597..2f92f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed a bug that would cause links to sanitize their href tags in the HTMLParsedContent component + ## [2.1.0] - 2021-03-24 ### Changes diff --git a/package-lock.json b/package-lock.json index c585e1f..d73b790 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@perimetre/ui", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/utils/wysiwyg.tsx b/src/utils/wysiwyg.tsx index e969cd9..e7521e3 100644 --- a/src/utils/wysiwyg.tsx +++ b/src/utils/wysiwyg.tsx @@ -124,7 +124,7 @@ export const editorSanitizeWhiteList: IWhiteList = { em: [], ins: [], li: [], - a: [], + a: ['style', 'href', 'target'], br: [] };