Skip to content

Commit

Permalink
fix issue reported in comment #1669 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jun 27, 2016
1 parent fffa919 commit 72fdce6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/static-net-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,11 @@ FilterParser.prototype.parse = function(raw) {
// normalize placeholders
if ( this.reHasWildcard.test(s) ) {
// remove pointless leading *
if ( s.startsWith('*') ) {
// https://github.com/gorhill/uBlock/issues/1669#issuecomment-224822448
// Keep the leading asterisk if we are dealing with a hostname-anchored
// filter, this will ensure the generic filter implementation is
// used.
if ( s.startsWith('*') && this.hostnameAnchored === false ) {
s = s.replace(/^\*+([^%0-9a-z])/, '$1');
}
// remove pointless trailing *
Expand Down

0 comments on commit 72fdce6

Please sign in to comment.