bvaughn / react-highlight-words

React component to highlight words within a larger body of text
https://bvaughn.github.io/react-highlight-words/
MIT License
2.16k stars 170 forks source link

Crashes when adding [ or \ characters to search string #110

Closed KrisjanisStrods closed 1 year ago

KrisjanisStrods commented 1 year ago

Turns out you just need to pass autoEscape and everything works fine

Avataw commented 1 year ago

I've just stumbled upon this very issue - why is this autoEscape not default to true? :) This seems quite unintuitive.

sergei-startsev commented 1 year ago

I've just stumbled upon this very issue - why is this autoEscape not default to true? :) This seems quite unintuitive.

We may consider it for the next major release.