Skip to content

Commit

Permalink
added support for passing options to sanitizeHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
icheishvili committed Sep 24, 2018
1 parent b07a5b2 commit fc8c958
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class ReactTooltip extends React.Component {
disable: PropTypes.bool,
scrollHide: PropTypes.bool,
resizeHide: PropTypes.bool,
wrapper: PropTypes.string
wrapper: PropTypes.string,
sanitizeHtmlOptions: PropTypes.any
};

static defaultProps = {
Expand Down Expand Up @@ -549,7 +550,7 @@ class ReactTooltip extends React.Component {
ref={ref => this.tooltipRef = ref}
{...ariaProps}
data-id='tooltip'
dangerouslySetInnerHTML={{__html: sanitizeHtml(placeholder)}}/>
dangerouslySetInnerHTML={{__html: sanitizeHtml(placeholder, this.props.sanitizeHtmlOptions)}}/>
)
} else {
return (
Expand Down

0 comments on commit fc8c958

Please sign in to comment.