From fc8c9584b9f9722ff9efeb7f479c4b7701afbcf6 Mon Sep 17 00:00:00 2001 From: Ilia Cheishvili Date: Mon, 24 Sep 2018 09:43:37 -0600 Subject: [PATCH] added support for passing options to sanitizeHtml --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index a97f33a44..adc662661 100644 --- a/src/index.js +++ b/src/index.js @@ -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 = { @@ -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 (