From 466e94680b7e3f5b091a835ce919d907e747accf Mon Sep 17 00:00:00 2001 From: raniellyferreira Date: Mon, 19 Jan 2015 15:17:40 -0200 Subject: [PATCH] =?UTF-8?q?adicionado=20mais=20caracteres=20para=20substit?= =?UTF-8?q?ui=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filtering/type-based/accent-neutralise.js | 67 +++++++++++++++++------ 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/filtering/type-based/accent-neutralise.js b/filtering/type-based/accent-neutralise.js index 8bb700e..3109741 100644 --- a/filtering/type-based/accent-neutralise.js +++ b/filtering/type-based/accent-neutralise.js @@ -39,6 +39,7 @@ jQuery.fn.DataTable.ext.type.search.string = function ( data ) { '' : typeof data === 'string' ? data + .replace( /\n/g, " " ) .replace( /έ/g, 'ε') .replace( /ύ/g, 'υ') .replace( /ό/g, 'ο') @@ -46,21 +47,55 @@ jQuery.fn.DataTable.ext.type.search.string = function ( data ) { .replace( /ά/g, 'α') .replace( /ί/g, 'ι') .replace( /ή/g, 'η') - .replace( /\n/g, ' ' ) - .replace( /á/g, 'a' ) - .replace( /é/g, 'e' ) - .replace( /í/g, 'i' ) - .replace( /ó/g, 'o' ) - .replace( /ú/g, 'u' ) - .replace( /ê/g, 'e' ) - .replace( /î/g, 'i' ) - .replace( /ô/g, 'o' ) - .replace( /è/g, 'e' ) - .replace( /ï/g, 'i' ) - .replace( /ü/g, 'u' ) - .replace( /ã/g, 'a' ) - .replace( /õ/g, 'o' ) - .replace( /ç/g, 'c' ) - .replace( /ì/g, 'i' ) : + .replace( /[äæǽ]/g, 'ae' ) + .replace( /[öœ]/g, 'oe' ) + .replace( /[ü]/g, 'ue' ) + .replace( /[Ä]/g, 'Ae' ) + .replace( /[Ü]/g, 'Ue' ) + .replace( /[Ö]/g, 'Oe' ) + .replace( /[ÀÁÂÃÄÅǺĀĂĄǍ]/g, 'A' ) + .replace( /[àáâãåǻāăąǎª]/g, 'a' ) + .replace( /[ÇĆĈĊČ]/g, 'C' ) + .replace( /[çćĉċč]/g, 'c' ) + .replace( /[ÐĎĐ]/g, 'D' ) + .replace( /[ðďđ]/g, 'd' ) + .replace( /[ÈÉÊËĒĔĖĘĚ]/g, 'E' ) + .replace( /[èéêëēĕėęě]/g, 'e' ) + .replace( /[ĜĞĠĢ]/g, 'G' ) + .replace( /[ĝğġģ]/g, 'g' ) + .replace( /[ĤĦ]/g, 'H' ) + .replace( /[ĥħ]/g, 'h' ) + .replace( /[ÌÍÎÏĨĪĬǏĮİ]/g, 'I' ) + .replace( /[ìíîïĩīĭǐįı]/g, 'i' ) + .replace( /[Ĵ]/g, 'J' ) + .replace( /[ĵ]/g, 'j' ) + .replace( /[Ķ]/g, 'K' ) + .replace( /[ķ]/g, 'k' ) + .replace( /[ĹĻĽĿŁ]/g, 'L' ) + .replace( /[ĺļľŀł]/g, 'l' ) + .replace( /[ÑŃŅŇ]/g, 'N' ) + .replace( /[ñńņňʼn]/g, 'n' ) + .replace( /[ÒÓÔÕŌŎǑŐƠØǾ]/g, 'O' ) + .replace( /[òóôõōŏǒőơøǿº]/g, 'o' ) + .replace( /[ŔŖŘ]/g, 'R' ) + .replace( /[ŕŗř]/g, 'r' ) + .replace( /[ŚŜŞŠ]/g, 'S' ) + .replace( /[śŝşšſ]/g, 's' ) + .replace( /[ŢŤŦ]/g, 'T' ) + .replace( /[ţťŧ]/g, 't' ) + .replace( /[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛ]/g, 'U' ) + .replace( /[ùúûũūŭůűųưǔǖǘǚǜ]/g, 'u' ) + .replace( /[ÝŸŶ]/g, 'Y' ) + .replace( /[ýÿŷ]/g, 'y' ) + .replace( /[Ŵ]/g, 'W' ) + .replace( /[ŵ]/g, 'w' ) + .replace( /[ŹŻŽ]/g, 'Z' ) + .replace( /[źżž]/g, 'z' ) + .replace( /[ÆǼ]/g, 'AE' ) + .replace( /[ß]/g, 'ss' ) + .replace( /[IJ]/g, 'IJ' ) + .replace( /[ij]/g, 'ij' ) + .replace( /[Œ]/g, 'OE' ) + .replace( /[ƒ]/g, 'f' ) : data; };