BUG 10963 Double quotes in suggest field SOLVED

- When I type double quotes in suggest field, there is an error with JSON concatenation
- Validation of double quotes in suggest fields.
This commit is contained in:
Hector Cortez
2013-03-08 17:02:08 -04:00
parent 38d1da9181
commit 2c861f5efc
3 changed files with 5 additions and 11 deletions

View File

@@ -336,6 +336,7 @@ _b.AutoSuggest.prototype.createList = function(arr)
// (as HTML, not DOM)
//
var val = arr[i].value;
val = val.split('"').join('"');
var st = val.toLowerCase().indexOf( this.sInp.toLowerCase() );
var output = val.substring(0,st) + "<em>" + val.substring(st, st+this.sInp.length) + "</em>" + val.substring(st+this.sInp.length);