Support generic exception filter for HTML filtering

Related feedback:
- fa5e4b7769 (commitcomment-93202819)
This commit is contained in:
Raymond Hill 2022-12-15 11:35:03 -05:00
parent a31f74325d
commit f78fb513a1
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 8 additions and 0 deletions

View File

@ -327,6 +327,14 @@ htmlFilteringEngine.compile = function(parser, writer) {
writer.select('HTML_FILTERS'); 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. // TODO: Mind negated hostnames, they are currently discarded.
for ( const { hn, not, bad } of parser.extOptions() ) { for ( const { hn, not, bad } of parser.extOptions() ) {