diff --git a/CHANGELOG.md b/CHANGELOG.md index 824e44fc47..8e6d839b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixes [#3561](https://github.com/microsoft/BotFramework-WebChat/issues/3561). Remove MyGet mentions from samples, by [@corinagum](https://github.com/corinagum) in PR [#3564](https://github.com/microsoft/BotFramework-WebChat/pull/3564) - Fixes [#3537](https://github.com/microsoft/BotFramework-WebChat/issues/3537). Fix some carousels improperly using aria-roledescription, by [@corinagum](https://github.com/corinagum) in PR [#3599](https://github.com/microsoft/BotFramework-WebChat/pull/3599) - Fixes [#3483](https://github.com/microsoft/BotFramework-WebChat/issues/3483). IE11 anchors fixed to open securely without 'noreferrer' or 'noopener', by [@corinagum](https://github.com/corinagum) in PR [#3607](https://github.com/microsoft/BotFramework-WebChat/pull/3607) +- Fixes [#3565](https://github.com/microsoft/BotFramework-WebChat/issues/3565). Allow strikethrough `` on sanitize markdown, by [@corinagum](https://github.com/corinagum) in PR [#3646](https://github.com/microsoft/BotFramework-WebChat/pull/3646) ### Samples diff --git a/packages/bundle/src/__tests__/renderMarkdown.spec.js b/packages/bundle/src/__tests__/renderMarkdown.spec.js index b3c799906c..ffc994dab1 100644 --- a/packages/bundle/src/__tests__/renderMarkdown.spec.js +++ b/packages/bundle/src/__tests__/renderMarkdown.spec.js @@ -63,4 +63,9 @@ describe('renderMarkdown', () => { '

(505)503-4455

\n' ); }); + + it('should render strikethrough text correctly', () => { + const options = { markdownRespectCRLF: true }; + expect(renderMarkdown(`~~strike text~~`, options)).toBe('

strike text

\n'); + }); }); diff --git a/packages/bundle/src/renderMarkdown.js b/packages/bundle/src/renderMarkdown.js index 8cdc391eb9..988df21adf 100644 --- a/packages/bundle/src/renderMarkdown.js +++ b/packages/bundle/src/renderMarkdown.js @@ -18,6 +18,7 @@ const SANITIZE_HTML_OPTIONS = { 'br', 'caption', 'code', + 'del', 'div', 'em', 'h1', @@ -29,11 +30,13 @@ const SANITIZE_HTML_OPTIONS = { 'hr', 'i', 'img', + 'ins', 'li', 'nl', 'ol', 'p', 'pre', + 's', 'span', 'strike', 'strong',