-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Strikethrough (<s>) is removed on sanitize #3565
Copy link
Copy link
Closed
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.backlogOut of scope for the current iteration but it will be evaluated in a future release.Out of scope for the current iteration but it will be evaluated in a future release.bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.Required for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.Required for internal Azure reporting. Do not delete.front-burnerp0Must Fix. Release-blockerMust Fix. Release-blockersize-s1 days or less1 days or less
Milestone
Metadata
Metadata
Assignees
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.backlogOut of scope for the current iteration but it will be evaluated in a future release.Out of scope for the current iteration but it will be evaluated in a future release.bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.Required for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.Required for internal Azure reporting. Do not delete.front-burnerp0Must Fix. Release-blockerMust Fix. Release-blockersize-s1 days or less1 days or less
Version
https://cdn.botframework.com/botframework-webchat/4.10.1/webchat.js
Describe the bug
When sending markdown text
"~~test~~"to the customer from the bot without a textFormat property in the activity (so it defaults to markdown), the WebChat shows "test" instead of "test".Additional context
Based on https://github.com/microsoft/BotFramework-WebChat/blob/bbbaeb9c2c46ec61ad109c2dbce46099f87efeba/packages/bundle/src/renderMarkdown.js, I concluded that markdown-it is used to render the markdown. Note that
strikeis allowed as an html tag whilstsis not. According to https://github.com/markdown-it/markdown-it/blob/master/test/fixtures/markdown-it/strikethrough.txt markdown-it converts strikethrough intos. This is subsequently sanitized, which explains the behaviour I experience.I would recommend added
sto the allowed html tag list.[Bug]