HTML filter activated results in blank page #293

Closed
opened 7 months ago by bege1 · 1 comments
bege1 commented 7 months ago

I run LocalCDN with Firefox 86.0 64 bit on Windows 10 Professional 64 bit.
uBlock Origin contains the rules created by LocalCDN.
This page https://www.flixbus.de/ is empty if HTML filter is acitve, it is displayed correctly with deactivated HTML filter. The domain check says

Result for »www.flixbus.de«
• No CSP header found
• No Service Worker found
• No integrity or crossorigin attributes found
I run LocalCDN with Firefox 86.0 64 bit on Windows 10 Professional 64 bit. uBlock Origin contains the rules created by LocalCDN. This page https://www.flixbus.de/ is empty if HTML filter is acitve, it is displayed correctly with deactivated HTML filter. The domain check says ``` Result for »www.flixbus.de« • No CSP header found • No Service Worker found • No integrity or crossorigin attributes found ```
nobody added the
bug
label 7 months ago
nobody added this to the v2.6.3 milestone 7 months ago
Owner

Many thanks for the report 👍

I can reproduce this error. It was caused because the regular expression did not mark the first charset tag (utf-8), but the second one (utf-8,%3Csvg):

<!DOCTYPE html><html lang="de"><head><meta charSet="utf-8"/>....background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'

This tells the TextDecoder to use utf-8,%3Csvg as the charset. This fails and as a result the HTML source code cannot be written back into the browser tab.

It has been fixed by checking the detected charset and if there is no match UTF-8 will be used.

Many thanks for the report 👍 I can reproduce this error. It was caused because the regular expression did not mark the first charset tag (`utf-8`), but the second one (`utf-8,%3Csvg`): ``` <!DOCTYPE html><html lang="de"><head><meta charSet="utf-8"/>....background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' ``` This tells the TextDecoder to use `utf-8,%3Csvg` as the charset. This fails and as a result the HTML source code cannot be written back into the browser tab. It has been fixed by checking the detected charset and if there is no match UTF-8 will be used.
nobody closed this issue 7 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.