diff --git a/dist/firefox/updates.json b/dist/firefox/updates.json index 528786640..ad0adcf00 100644 --- a/dist/firefox/updates.json +++ b/dist/firefox/updates.json @@ -3,10 +3,10 @@ "uBlock0@raymondhill.net": { "updates": [ { - "version": "1.17.5.103", + "version": "1.17.5.104", "applications": { "gecko": { "strict_min_version": "52" } }, - "update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.17.5rc3", - "update_link": "https://github.com/gorhill/uBlock/releases/download/1.17.5rc3/uBlock0_1.17.5rc3.firefox.signed.xpi" + "update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.17.5rc4", + "update_link": "https://github.com/gorhill/uBlock/releases/download/1.17.5rc4/uBlock0_1.17.5rc4.firefox.signed.xpi" } ] } diff --git a/dist/version b/dist/version index 96ec1ff63..0241b427a 100644 --- a/dist/version +++ b/dist/version @@ -1 +1 @@ -1.17.5.103 +1.17.5.104 diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 6d30a36d8..d10eb4100 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -1054,14 +1054,8 @@ FilterContainer.prototype.retrieveGenericSelectors = function(request) { for ( let type in this.lowlyGeneric ) { let entry = this.lowlyGeneric[type]; let selectors = request[entry.canonical]; - if ( typeof selectors !== 'string' ) { continue; } - let strEnd = selectors.length; - let sliceBeg = 0; - do { - let sliceEnd = selectors.indexOf('\n', sliceBeg); - if ( sliceEnd === -1 ) { sliceEnd = strEnd; } - let selector = selectors.slice(sliceBeg, sliceEnd); - sliceBeg = sliceEnd + 1; + if ( Array.isArray(selectors) === false ) { continue; } + for ( let selector of selectors ) { if ( entry.simple.has(selector) === false ) { continue; } let bucket = entry.complex.get(selector); if ( bucket !== undefined ) { @@ -1080,7 +1074,7 @@ FilterContainer.prototype.retrieveGenericSelectors = function(request) { simpleSelectors.add(selector); } } - } while ( sliceBeg < strEnd ); + } } // Apply exceptions: it is the responsibility of the caller to provide