Code Review
/
aai
/
sparky-fe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Escaping regex characters
[aai/sparky-fe.git]
/
src
/
generic-components
/
autoCompleteSearchBar
/
AutoCompleteSearchBar.jsx
diff --git
a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
index
4f93125
..
47cdc9a
100644
(file)
--- a/
src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
+++ b/
src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
@@
-164,7
+164,8
@@
export default class AutoCompleteSearchBar extends Component {
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
- textToHighlight={suggestionTextArray[arrayIndex]}/>
+ textToHighlight={suggestionTextArray[arrayIndex]}
+ autoEscape={true}/>
{ ++arrayIndex ? ' ' : ' '}
</span>);
{ ++arrayIndex ? ' ' : ' '}
</span>);
@@
-185,7
+186,8
@@
export default class AutoCompleteSearchBar extends Component {
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
- textToHighlight={suggestionTextArray[arrayIndex]}/>
+ textToHighlight={suggestionTextArray[arrayIndex]}
+ autoEscape={true}/>
{ ++arrayIndex ? ' ' : ' '}
</span>);
{ ++arrayIndex ? ' ' : ' '}
</span>);