Skip to content

[Firefox] Wrong encoding results in garbled characters on German site #3507

@gorhill

Description

@gorhill

First reported on Reddit:

After some wasted hours of recherche, I gave up and dare to approach you.

Windows 10 - 32 Bit Firefox Vers. 58.0.2 (32-Bit) ublock origin 1.15.4 Firefox addon All other firefox addons are deactivated.

There is an issue when uBlock origin is activated. The default character set of firefox shows wrong signs for the german mutated vowels "ä, ö, ü" aso.

at site (for example) http://www.chip.de/news/Eventbrite-Online-Veranstaltungs-Service-fuer-Profis-56507207.html

Example "größeren Veranstaltungen," instead "größeren"

The issue does not occur, when uBlock origin is deactivated.

The issue is caused by scriptlet injection, which is done using response body filtering since uBO 1.15.0. In doing so, uBO may have to decode/re-encode the page after injecting the scriptlets at the top of the document.

The issue is that the <meta http-equiv="content"> directive is pass the first 1024 bytes, while uBO assumes this should not happen as per w3c regarding the use of such directive.

The issue seems to affect only older articles on that site, probably at a time when the recommendations regarding the usage <meta http-equiv="content"> where not widely enforced?

In any case, scanning the first 2048 bytes rather than the first 1024 bytes fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions