+ regex_escape: function(term) {
+ term = term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1");
+ /* no polish diacritics; should be more locale-aware */
+ term = term.replace(/a/g, '[aÄ…]')
+ .replace(/c/g, '[cć]')
+ .replace(/e/g, '[eÄ™]')
+ .replace(/l/g, '[lł]')
+ .replace(/n/g, '[nń]')
+ .replace(/o/g, '[oó]')
+ .replace(/s/g, '[sÅ›]')
+ .replace(/z/g, '[zźż]');
+ return term;
+ },