From 7b745f6f1f4e2985c1d545ce5051df7fe2205bf9 Mon Sep 17 00:00:00 2001 From: Corina Date: Fri, 21 Dec 2018 11:11:03 -0800 Subject: [PATCH] Fix #1512, sanitization of anchors accessibility (#1530) * Fix #1512, sanitization of anchors accessibility * Update CHANGELOG.md * PR Fix --- CHANGELOG.md | 1 + packages/bundle/src/renderMarkdown.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f8a313492..d9bee3a69d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix [#1409](https://github.com/Microsoft/BotFramework-WebChat/issues/1409). Added microphone status as screen reader only text, by [@corinagum](https://github.com/corinagum) in PR [#1490](https://github.com/Microsoft/BotFramework-WebChat/pull/1490) - Fix [#1605](https://github.com/Microsoft/BotFramework-WebChat/issues/1305), [#1316](https://github.com/Microsoft/BotFramework-WebChat/issues/1316), [#1341](https://github.com/Microsoft/BotFramework-WebChat/issues/1341), [#1411](https://github.com/Microsoft/BotFramework-WebChat/issues/1411). Fix color contrast ratios & downloadIcon narrator accessibility by [@corinagum](https://github.com/corinagum) in PR [#1494](https://github.com/Microsoft/BotFramework-WebChat/pull/1494) - Fix [#1264](https://github.com/Microsoft/BotFramework-WebChat/issues/1264), [#1308](https://github.com/Microsoft/BotFramework-WebChat/issues/1308), [#1318](https://github.com/Microsoft/BotFramework-WebChat/issues/1318), [#1334](https://github.com/Microsoft/BotFramework-WebChat/issues/1334),[#1425](https://github.com/Microsoft/BotFramework-WebChat/issues/1425). Update icons with accessibilty, Sent message accessibility, and fix sample README.md, [@corinagum](https://github.com/corinagum) in PR [#1506](https://github.com/Microsoft/BotFramework-WebChat/pull/1506) +- Fix [#1512](https://github.com/Microsoft/BotFramework-WebChat/issues/1512). Fix #1512: fix sanitization of anchors (allow title attributes), by [@corinagum](https://github.com/corinagum) in PR [#1530](https://github.com/Microsoft/BotFramework-WebChat/pull/1530) ### Removed - `botAvatarImage` and `userAvatarImage` props, as they are moved inside `styleOptions`, in PR [#1486](https://github.com/Microsoft/BotFramework-WebChat/pull/1486) diff --git a/packages/bundle/src/renderMarkdown.js b/packages/bundle/src/renderMarkdown.js index 517b362b85..5372ba6a0d 100644 --- a/packages/bundle/src/renderMarkdown.js +++ b/packages/bundle/src/renderMarkdown.js @@ -4,7 +4,7 @@ import sanitizeHTML from 'sanitize-html'; const SANITIZE_HTML_OPTIONS = { allowedAttributes: { - a: ['href', 'name', 'target'], + a: ['href', 'name', 'target', 'title'], img: ['alt', 'src'] }, allowedTags: [