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

Improve 'href-sanitizer' — add ability to modify the value #460

Closed
slavaleleka opened this issue Oct 15, 2024 · 1 comment
Closed

Improve 'href-sanitizer' — add ability to modify the value #460

slavaleleka opened this issue Oct 15, 2024 · 1 comment

Comments

@slavaleleka
Copy link
Contributor

#455 (comment):

It'd be best if href's attributes can be modified at the same time.

For example, every video link in youtube search result page has a parameter "pp=[base64 encoded search query]" in it and it can't be got rid of with current options.
Can we have another option for text and ?parameter to remove parameters in href, like $removeparam considering YouTube can add more private info in it. Sharing raw links from right click copy also exposes how the sharer found the video. $removeparam can only remove parameters after clicking on the link.

Other websites might shove in unnecessary, often tracking parameters as well. So I would like to see a combination of removeparam and href-santinizer

@AdamWr
Copy link
Member

AdamWr commented Oct 15, 2024

It would be also nice to have an option to remove hash from the link, a bit related to - #135

For example, if there is a link like this one:

<a href="https://example.org/?article#utm_source=Facebook"></a>

it should be possible to remove #utm_source=Facebook.


Another hash related case - AdguardTeam/AdguardFilters#191452
Example link:

https://www.novinky.cz/clanek/zahranicni-evropa-po-ctrnacti-letech-prvni-pruzkum-ktery-v-madarsku-nevyhral-orban-40494215#dop_ab_variant=0&dop_source_zone_name=novinky.sznhp.box&dop_id=40494215&source=hp&seq_no=2&utm_campaign=&utm_medium=z-boxiku&utm_source=www.seznam.cz

@adguard-bot adguard-bot assigned jellizaveta and unassigned maximtop Oct 15, 2024
@slavaleleka slavaleleka added the enhancement Improvement of existent feature label Oct 16, 2024
adguard pushed a commit that referenced this issue Oct 25, 2024
adguard pushed a commit that referenced this issue Oct 30, 2024
…' values in 'transform' option.

Squashed commit of the following:

commit 737dda8
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 20:26:25 2024 +0300

    add comment

commit da34a66
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 20:04:41 2024 +0300

    update script

commit f3c3616
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 19:49:42 2024 +0300

    fix comments, update script

commit 99439d6
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 15:45:40 2024 +0300

    refactor

commit bafa849
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 15:16:15 2024 +0300

    update compatibility table

commit 83e1d96
Merge: 7fb9cf0 e4cb5f3
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 15:05:16 2024 +0300

    Merge branch 'fix/AG-36910' of ssh://bit.int.agrd.dev:7999/adguard-filters/scriptlets into fix/AG-36910

commit 7fb9cf0
Author: jellizaveta <[email protected]>
Date:   Mon Oct 28 15:01:33 2024 +0300

    update var names, docs, conditions

commit c601f8d
Author: jellizaveta <[email protected]>
Date:   Fri Oct 25 20:37:26 2024 +0300

    update docs

commit ff6f047
Author: jellizaveta <[email protected]>
Date:   Fri Oct 25 20:31:22 2024 +0300

    moved the calculations inside the function

commit e4cb5f3
Author: Slava Leleka <[email protected]>
Date:   Fri Oct 25 20:10:51 2024 +0300

    src/scriptlets/href-sanitizer.ts edited online with Bitbucket

commit 9736333
Author: jellizaveta <[email protected]>
Date:   Fri Oct 25 19:59:04 2024 +0300

    fix docs

commit 1ecfacb
Merge: 5ccadb6 a875fdf
Author: jellizaveta <[email protected]>
Date:   Fri Oct 25 19:47:47 2024 +0300

    merge master, resolve conflicts

commit 5ccadb6
Author: jellizaveta <[email protected]>
Date:   Fri Oct 25 19:37:30 2024 +0300

    AG-36910 Improve 'href-sanitizer' — add 'removeParam' and 'removeHash' values in 'transform' option. #460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants