The Wayback Machine - https://web.archive.org/web/20210920170822/https://github.com/gorhill/uBlock/issues/3399
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML filtering breaks webpages of Shift_JIS encoding #3399

Open
yasmise opened this issue Jan 4, 2018 · 3 comments
Open

HTML filtering breaks webpages of Shift_JIS encoding #3399

yasmise opened this issue Jan 4, 2018 · 3 comments

Comments

@yasmise
Copy link

@yasmise yasmise commented Jan 4, 2018

Describe the issue

An issue similar to #3391 and #3397 also happens when the webpage's encoding is Shift_JIS. I think you are aware of this regarding to your comment, so I'm glad if you could add support for Shift_JIS.

One or more specific URLs where the issue occurs

http://www.sony.jp/
http://www.itmedia.co.jp/

Screenshot in which the issue can be seen

Left side is good, right side is broken.

www.sony.jp
sony

www.itmedia.co.jp
itmedia

Steps for anyone to reproduce the issue

  1. Add these testing filters.
sony.jp##^script:has-text(sony-marketing)
itmedia.co.jp##^script:has-text(document.write)
  1. Visit http://www.sony.jp/ or http://www.itmedia.co.jp/. The page is broken.
  2. Even I change the encoding to Unicode, text is still broken.

Your settings

  • OS/version: Windows 10 Home 1709
  • Browser/version: Firefox 57.0.3
  • uBlock Origin version: 1.14.23b12
Your filter lists

Default + JPN

Your custom filters (if any)

itmedia.co.jp##^script:has-text(document.write)
sony.jp##^script:has-text(sony-marketing)

@gorhill
Copy link
Owner

@gorhill gorhill commented Jan 4, 2018

This is part 1 of the fix: if a text encoding is not supported, bail out of enforcing HTML filtering. I thought I had it fixed when I fixed #3397, but clearly this was not working as intended. I tested the repro cases here, and HTML filtering was correctly skipped, since the encoding for Shift_JIS is not available yet.

@gorhill
Copy link
Owner

@gorhill gorhill commented Jan 5, 2018

ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
@eEIi0A5L
Copy link

@eEIi0A5L eEIi0A5L commented Feb 3, 2018

Describe the issue

I have faced same issue. Just adding information.

One or more specific URLs where the issue occurs

http://www.wowkorea.jp/starnews/400626.html

Screenshot in which the issue can be seen

default

Steps for anyone to reproduce the issue

  1. Create and use a new profile for Firefox.
  2. Install uBlock Origin 1.15.0
  3. The filter settings are only below:
    .jp##^div[id^="div-gpt-ad"]
  4. Go to http://www.wowkorea.jp/starnews/400626.html

Your settings

  • OS/version: Windows 10 Japanese 16299.214
  • Browser/version: Firefox 58.0.1 64 bit
  • uBlock Origin version: 1.15.0
Your filter lists

just below only, no other filters.

.jp##^div[id^="div-gpt-ad"]

2

3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants