-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Jocupi/external link indication #3108
Jocupi/external link indication #3108
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments. It also looks like there is a failing test that needs to be addressed.
@@ -7,7 +7,7 @@ import sanitizeHTML from 'sanitize-html'; | |||
|
|||
const SANITIZE_HTML_OPTIONS = { | |||
allowedAttributes: { | |||
a: ['aria-label', 'href', 'name', 'target', 'title'], | |||
a: ['aria-label', 'href', 'name', 'target', 'title', 'role', 'class'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that 'class' belongs in this list. As my understanding is that these are supported markdown attributes and we don't want the markdown author to support overriding this behavior.
It also looks like role was added as part of this change, but not necessarily used. It might be left over from another change you inherited.
} | ||
|
||
const urlAttrIndex = tokens[index].attrIndex('href'); | ||
if (isExternal(urlAttrIndex)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be conditionally added since the markdown author could supply their own title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ternal or external links
…fice UI Fabric icons
Is there an update for this PR? There are a number of tree changes to Web Chat incoming, so my recommendation is to close this PR and open a new one. Please be sure to address compulim's comments above before filing the new PR. |
Fixes #3087
Description
Specific Changes