Skip to content

Commit

Permalink
Merge pull request #439 from AlexLoxo/master
Browse files Browse the repository at this point in the history
added support for passing options to sanitizeHtml
  • Loading branch information
wwayne authored Oct 12, 2018
2 parents b07a5b2 + fc8c958 commit a3a6d85
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 a3a6d85

Please sign in to comment.