Skip to content

Commit

Permalink
Core: Url parser now ignores "www" & removed parsed flag
Browse files Browse the repository at this point in the history
The filter widget finds "http" querys
  • Loading branch information
Mottie committed Jul 21, 2016
1 parent 9afb1df commit bd25372
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/example-colspan.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1>Demo</h1>
<th>Product ID</th>
<th>Numeric</th>
<th>Animals</th>
<th >Url</th>
<th>Url</th>
</tr>
</thead>
<tfoot>
Expand All @@ -146,7 +146,7 @@ <h1>Demo</h1>
<th>Product ID</th>
<th>Numeric</th>
<th id="test">Animals</th>
<th >Url</th>
<th>Url</th>
</tr>
</tfoot>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1><a href="https://github.com/Mottie/tablesorter">table<em>sorter</em></a></h1
<tr><td>abc 11</td><td>&#163;3,20</td><td>Chimp</td><td>http://www.ucla.edu/</td></tr>
<tr><td>abc 2</td><td>&#163;56,10</td><td>Elephant</td><td>http://www.wikipedia.org/</td></tr>
<tr><td>abc 9</td><td>&#163;3,20</td><td>Lion</td><td>http://www.nytimes.com/</td></tr>
<tr><td>ABC 10</td><td>&#163;87,00</td><td>Zebra</td><td>http://www.google.com</td></tr>
<tr><td>ABC 10</td><td>&#163;87,00</td><td>Zebra</td><td>https://github.com</td></tr>
<tr><td>zyx 1</td><td>&#163;99,90</td><td>Koala</td><td>http://www.mit.edu/</td></tr>
<tr><td>zyx 12</td><td>&#163;234,10</td><td>Llama</td><td>http://www.nasa.gov/</td></tr>
</tbody>
Expand Down
5 changes: 2 additions & 3 deletions js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2534,8 +2534,8 @@

// 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.urlProtocolTest = /^(https?|ftp|file):\/\//;
ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\/(www\.)?/;
ts.addParser({
id : 'url',
is : function( str ) {
Expand All @@ -2544,7 +2544,6 @@
format : function( str ) {
return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str;
},
parsed : true, // filter widget flag
type : 'text'
});

Expand Down

0 comments on commit bd25372

Please sign in to comment.