Core: Url parser now ignores "www" & removed parsed flag

The filter widget finds "http" querys
This commit is contained in:
Rob Garrison 2016-07-21 14:51:35 -05:00
parent 9afb1dfcea
commit bd25372a72
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
3 changed files with 5 additions and 6 deletions

View File

@ -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>

View File

@ -50,7 +50,7 @@
<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>

View File

@ -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'
});