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
@ -137,7 +137,7 @@ Search:
|
||||
<th>Product ID</th>
|
||||
<th>Numeric</th>
|
||||
<th>Animals</th>
|
||||
<th >Url</th>
|
||||
<th>Url</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
@ -146,7 +146,7 @@ Search:
|
||||
<th>Product ID</th>
|
||||
<th>Numeric</th>
|
||||
<th id="test">Animals</th>
|
||||
<th >Url</th>
|
||||
<th>Url</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
@ -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 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 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 12</td><td>£234,10</td><td>Llama</td><td>http://www.nasa.gov/</td></tr>
|
||||
</tbody>
|
||||
|
@ -2535,7 +2535,7 @@
|
||||
// too many protocols to add them all https://en.wikipedia.org/wiki/URI_scheme
|
||||
// now, this regex can be updated before initialization
|
||||
ts.regex.urlProtocolTest = /^(https?|ftp|file):\/\//;
|
||||
ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\//;
|
||||
ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\/(www\.)?/;
|
||||
ts.addParser({
|
||||
id : 'url',
|
||||
is : function( str ) {
|
||||
@ -2544,7 +2544,6 @@
|
||||
format : function( str ) {
|
||||
return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str;
|
||||
},
|
||||
parsed : true, // filter widget flag
|
||||
type : 'text'
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user