mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: Url parser now ignores "www" & removed parsed flag
The filter widget finds "http" querys
This commit is contained in:
parent
9afb1dfcea
commit
bd25372a72
@ -50,7 +50,7 @@
|
|||||||
<tr><td>abc 11</td><td>£3,20</td><td>Chimp</td><td>http://www.ucla.edu/</td></tr>
|
<tr><td>abc 11</td><td>£3,20</td><td>Chimp</td><td>http://www.ucla.edu/</td></tr>
|
||||||
<tr><td>abc 2</td><td>£56,10</td><td>Elephant</td><td>http://www.wikipedia.org/</td></tr>
|
<tr><td>abc 2</td><td>£56,10</td><td>Elephant</td><td>http://www.wikipedia.org/</td></tr>
|
||||||
<tr><td>abc 9</td><td>£3,20</td><td>Lion</td><td>http://www.nytimes.com/</td></tr>
|
<tr><td>abc 9</td><td>£3,20</td><td>Lion</td><td>http://www.nytimes.com/</td></tr>
|
||||||
<tr><td>ABC 10</td><td>£87,00</td><td>Zebra</td><td>http://www.google.com</td></tr>
|
<tr><td>ABC 10</td><td>£87,00</td><td>Zebra</td><td>https://github.com</td></tr>
|
||||||
<tr><td>zyx 1</td><td>£99,90</td><td>Koala</td><td>http://www.mit.edu/</td></tr>
|
<tr><td>zyx 1</td><td>£99,90</td><td>Koala</td><td>http://www.mit.edu/</td></tr>
|
||||||
<tr><td>zyx 12</td><td>£234,10</td><td>Llama</td><td>http://www.nasa.gov/</td></tr>
|
<tr><td>zyx 12</td><td>£234,10</td><td>Llama</td><td>http://www.nasa.gov/</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -2535,7 +2535,7 @@
|
|||||||
// too many protocols to add them all https://en.wikipedia.org/wiki/URI_scheme
|
// too many protocols to add them all https://en.wikipedia.org/wiki/URI_scheme
|
||||||
// now, this regex can be updated before initialization
|
// now, this regex can be updated before initialization
|
||||||
ts.regex.urlProtocolTest = /^(https?|ftp|file):\/\//;
|
ts.regex.urlProtocolTest = /^(https?|ftp|file):\/\//;
|
||||||
ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\//;
|
ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\/(www\.)?/;
|
||||||
ts.addParser({
|
ts.addParser({
|
||||||
id : 'url',
|
id : 'url',
|
||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
@ -2544,7 +2544,6 @@
|
|||||||
format : function( str ) {
|
format : function( str ) {
|
||||||
return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str;
|
return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str;
|
||||||
},
|
},
|
||||||
parsed : true, // filter widget flag
|
|
||||||
type : 'text'
|
type : 'text'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user