diff --git a/src/js/html-filtering.js b/src/js/html-filtering.js index 9867d1842..3da755f7e 100644 --- a/src/js/html-filtering.js +++ b/src/js/html-filtering.js @@ -327,6 +327,14 @@ htmlFilteringEngine.compile = function(parser, writer) { writer.select('HTML_FILTERS'); + // Only exception filters are allowed to be global. + if ( parser.hasOptions() === false ) { + if ( exception ) { + writer.push([ 64, '', 1, compiled ]); + } + return; + } + // TODO: Mind negated hostnames, they are currently discarded. for ( const { hn, not, bad } of parser.extOptions() ) {