Escaping regex characters 31/68731/1
authorrv871f <richard.vondadelszen@amdocs.com>
Mon, 24 Sep 2018 20:15:32 +0000 (16:15 -0400)
committerrv871f <richard.vondadelszen@amdocs.com>
Mon, 24 Sep 2018 20:15:55 +0000 (16:15 -0400)
Issue-ID: AAI-1672
Change-Id: I47d50fbcfac453baf314d789ed9a4f32e9656330
Signed-off-by: rv871f <richard.vondadelszen@amdocs.com>
src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx

index 4f93125..47cdc9a 100644 (file)
@@ -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>);