You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2018. It is now read-only.
and on a function AbstractChosen.prototype.winnow_results change
this - escapedSearchText = searchText.replace(/[-[]{}()*+?.,^$|#\s]/g, "$&");
to this - escapedSearchText = this.escape_regexp(searchText);
this will make all the special character for the a,A,e,E,i,I,o,O,u,U,c,C,n,N,&
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry for the bad english
on a non minified archive set this new prop
AbstractChosen.prototype.escape_regexp = function (querryEntered) {
var querryEscaped = querryEntered.replace(/([.?+^$[](){}|-])/g, "$1");
querryEscaped = querryEntered.replace(/[-[]{}()+?.,^$|#\s]/g, "$&")
//arruma os caracteres especiais para serem exibidos em view
querryEscaped = querryEscaped.replace(/a/g, "(a|\u00e1|\u00e0|\u00e2|\u00e3|\u00e4)");
querryEscaped = querryEscaped.replace(/A/g, "(A|\u00c1|\u00c0|\u00c2|\u00c3|\u00c4)");
querryEscaped = querryEscaped.replace(/e/g, "(e|\u00e9|\u00e8|\u00ea|\u00ea)");
querryEscaped = querryEscaped.replace(/E/g, "(e|\u00c9|\u00c8|\u00ca|\u00cb)");
querryEscaped = querryEscaped.replace(/i/g, "(i|\u00ed|\u00ec|\u00ee|\u00ef)");
querryEscaped = querryEscaped.replace(/I/g, "(I|\u00cd|\u00cc|\u00ce|\u00cf)");
querryEscaped = querryEscaped.replace(/o/g, "(o|\u00f3|\u00f2|\u00f4|\u00f5|\u00f6)");
querryEscaped = querryEscaped.replace(/O/g, "(O|\u00d3|\u00d2|\u00d4|\u00d5|\u00d6)");
querryEscaped = querryEscaped.replace(/u/g, "(u|\u00fa|\u00f9|\u00fb|\u00fc)");
querryEscaped = querryEscaped.replace(/U/g, "(U|\u00da|\u00d9|\u00db)");
querryEscaped = querryEscaped.replace(/c/g, "(c|\u00e7)");
querryEscaped = querryEscaped.replace(/C/g, "(C|\u00c7)");
querryEscaped = querryEscaped.replace(/n/g, "(n|\u00f1)");
querryEscaped = querryEscaped.replace(/N/g, "(N|\u00d1)");
querryEscaped = querryEscaped.replace(/&/g, "(\u0026)");
querryEscaped = querryEscaped.replace(/'/g, "(\u0027)");
//return queryToEscape.replace(/([.?*+^$[](){}|-])/ig, "$1");
return querryEscaped;
};
and on a function AbstractChosen.prototype.winnow_results change
this - escapedSearchText = searchText.replace(/[-[]{}()*+?.,^$|#\s]/g, "$&");
to this - escapedSearchText = this.escape_regexp(searchText);
this will make all the special character for the a,A,e,E,i,I,o,O,u,U,c,C,n,N,&
The text was updated successfully, but these errors were encountered: