react-highlight-words icon indicating copy to clipboard operation
react-highlight-words copied to clipboard

fix: set autoEscape to true on demo website

Open dorobila opened this issue 2 years ago • 3 comments

The demo website was crashing when you typed [ into Search terms box.

Had a discussion with bvaughn about setting the autoEscape param to true on highlight-words-core package, but as he said, changing the default value is going to have performance implications for current users.

image image

dorobila avatar Feb 24 '23 15:02 dorobila

@dorobila autoEscape is not enabled by default, so I'd rather provide an option to enable/disable it on the demo to avoid confusion.

sergei-startsev avatar Feb 27 '23 11:02 sergei-startsev

@sergei-startsev sure thing. I'll add the checkbox, but that is still going to break the app if it's unchecked on page load or unchecked and someone types [.

dorobila avatar Feb 27 '23 12:02 dorobila

@dorobila I agree that this case should be handled out of the box, but changing the defaults can be considered a breaking change. There're some plans to refresh the library, so there will be an opportunity to change it in one of major releases.

sergei-startsev avatar Feb 27 '23 16:02 sergei-startsev