diff options
author | rv871f <richard.vondadelszen@amdocs.com> | 2018-09-24 16:15:32 -0400 |
---|---|---|
committer | rv871f <richard.vondadelszen@amdocs.com> | 2018-09-24 16:15:55 -0400 |
commit | 63ebf4328b260219308587a040fc5a2ab6b5b9d8 (patch) | |
tree | 7f68d9b85c0c5ec1e8a70915e37ced89390e10bc /src/generic-components/autoCompleteSearchBar | |
parent | 21ab8d88d55d264eff83d628ba924e95cff52fc4 (diff) |
Escaping regex characters
Issue-ID: AAI-1672
Change-Id: I47d50fbcfac453baf314d789ed9a4f32e9656330
Signed-off-by: rv871f <richard.vondadelszen@amdocs.com>
Diffstat (limited to 'src/generic-components/autoCompleteSearchBar')
-rw-r--r-- | src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx index 4f93125..47cdc9a 100644 --- 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} - textToHighlight={suggestionTextArray[arrayIndex]}/> + textToHighlight={suggestionTextArray[arrayIndex]} + autoEscape={true}/> { ++arrayIndex ? ' ' : ' '} </span>); @@ -185,7 +186,8 @@ export default class AutoCompleteSearchBar extends Component { <Highlighter key={arrayIndex + 'high'} highlightClassName='highlight' searchWords={toHighLightArray} - textToHighlight={suggestionTextArray[arrayIndex]}/> + textToHighlight={suggestionTextArray[arrayIndex]} + autoEscape={true}/> { ++arrayIndex ? ' ' : ' '} </span>); |