From 51fc60223aeacc62d2d29a001f901038da7129d7 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 20 Jan 2018 09:10:23 -0500 Subject: [PATCH] fix #3450 --- src/js/cosmetic-filtering.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 06380d6fc..d634b93a1 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -107,7 +107,9 @@ var FilterHostname = function(s, hostname) { FilterHostname.prototype.fid = 8; FilterHostname.prototype.retrieve = function(hostname, out) { - if ( hostname.endsWith(this.hostname) ) { + if ( hostname.endsWith(this.hostname) === false ) { return; } + var i = hostname.length - this.hostname.length; + if ( i === 0 || hostname.charCodeAt(i-1) === 0x2E /* '.' */ ) { out.add(this.s); } };