Skip to content

Commit

Permalink
fix(core/help): Allow target="_blank" in links in help popover (#5000)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Mar 14, 2018
1 parent 274690d commit 17c8eef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/modules/core/src/help/HelpField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ export class HelpField extends React.Component<IHelpFieldProps, IState> {
contentString = this.helpContentsRegistry.getHelpField(id) || this.helpContents[id] || fallback;
}

const config = { ADD_ATTR: ['target'] }; // allow: target="_blank"
return {
contents: <div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(contentString) }}/>,
contents: <div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(contentString, config) }}/>,
}
}

Expand Down

0 comments on commit 17c8eef

Please sign in to comment.