Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown: whitelist "rel" attribute on sanitization #3220

Merged
merged 7 commits into from
Jun 8, 2020

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Jun 8, 2020

Fixes #3217.

Changelog Entry

Fixed

Description

Hyperlinks in Markdown should have rel="noopener noreferrer".

Specific Changes

  • Update sanitization rules for <a> to whitelist rel
  • Add tests

  • Testing Added

Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@compulim compulim merged commit bbbaeb9 into microsoft:master Jun 8, 2020
@compulim compulim deleted the fix-3217 branch June 8, 2020 22:06
@compulim compulim mentioned this pull request Jun 10, 2020
38 tasks
@sanjayror
Copy link

Fixes #3217.

Changelog Entry

Fixed

Description

Hyperlinks in Markdown should have rel="noopener noreferrer".

Specific Changes

  • Update sanitization rules for <a> to whitelist rel

  • Add tests

  • Testing Added

Hi

I want to make some change in

https://github.com/microsoft/BotFramework-WebChat/blob/master/packages/bundle/src/renderMarkdown.js

const html = customMarkdownIt.render(markdown);
return sanitizeHTML(html, SANITIZE_HTML_OPTIONS);

I want to comment

//return sanitizeHTML(html, SANITIZE_HTML_OPTIONS);

and return html;

we sanitize html creating a problem for us can we do this

urgent help guys.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Markdown] The link should have rel="noopener noreferrer"
4 participants