+ 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;
+ },