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

Element picker mishandles identifiers with escaped periods #162

Closed
7 of 8 tasks
eyalroz opened this issue Aug 12, 2018 · 3 comments
Closed
7 of 8 tasks

Element picker mishandles identifiers with escaped periods #162

eyalroz opened this issue Aug 12, 2018 · 3 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@eyalroz
Copy link

eyalroz commented Aug 12, 2018

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

This is an issue I'm experiencing with websites containing elements whose IDs have backslashes in them, in particular backslashes before periods (\.). When I try to block such an element by right-clicking it and selecting "Block Element", I get the dialog in this partial screenshot:

  1. The text in the text bog is not the full ID - only up to the first backslash
  2. Clicking the full ID in the list below the text box does not produce the full ID in the textbox - again, just up to the backslash

The ID in the example in the screenshot, with its rule prefix, is ###new-haaretz\.co\.il\.ghost\.inread\.2.xxvert__content--c.h-mb.

A specific URL where the issue occurs

As you may have guessed from the element ID, this issue manifests on the website haaretz.co.il . But - you probably won't see it, since the site has a pay-wall and this happens on the for-pay pages. Also, it's a Hebrew-language website. Still, here is a (inaccessible without being subscribed) URL in which the bug manifests: https://www.haaretz.co.il/opinions/.premium-1.6366330

Steps to Reproduce

  1. Get subscription credentials for haaretz.co.il (I can provide them temporarily)
  2. Visit the specified URL
  3. Try to block one of the ads that show up between consecutive paragraphs of the main text column (they have a small texual header, "--פרסומת--", which means "advertisement" in Hebrew.
  4. Watch how the Element Picker dialog behaves.

Expected behavior:

The text box will show the entire element ID, with backslashes.

Actual behavior:

The text box will show the ID up to the first backslash.

Your environment

  • uBlock Origin version: 1.16.14
  • Firefox ESR 52.9.0
  • Devuan ASCII 2.0 (basically it's Debian Stretch without systemd)

PS - Once this is resolved, I hope to be able to define filters matching prefixes of such IDs; but that's beyond the scope of this issue.

@uBlock-user uBlock-user added the bug Something isn't working label Aug 12, 2018
@uBlock-user
Copy link
Contributor

Reproducible on Chromium too.

@gwarser
Copy link
Member

gwarser commented Aug 12, 2018

test div with foo\.bar id
test div with foo.bar id

@uBlock-user uBlock-user added the fixed issue has been addressed label Aug 13, 2018
@eyalroz eyalroz changed the title Element picker mishandles identifiers with backslashes Element picker mishandles identifiers with escaped periods Aug 13, 2018
@eyalroz
Copy link
Author

eyalroz commented Aug 13, 2018

Thank you for the quick fix and quick release of a new version :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants