Skip to content

Bind address to new element instead of raw HTML construction #3567

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jul 16, 2025

What does this implement/fix?

Fix incorrectly doubly-escaped links. This is a follow-up on the abandoned #3552

Can be tested by adding the list

https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt

and seeing that the click-link does not work on current development.


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories development branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

@DL6ER DL6ER requested a review from a team as a code owner July 16, 2025 14:22
@DL6ER DL6ER added the Bugfix label Jul 16, 2025
Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this expected?

Image

Your fix works. However, I like the idea from #3552 where we had a function that checks if a string is encoded or not and performs encoding if necessary. I still think, this could be useful in other places as well.

@DL6ER
Copy link
Member Author

DL6ER commented Jul 16, 2025

Yes, this is expected and it has been like that before. The idea is to use a (reversible) encoded form of the element itself as identifier so we don't need to keep a list id <-> url up-to-date while the table is being modified.

I still think, this could be useful in other places as well.

But we agreed on the add-another-icons-framework that we should not add new things without applications for them :-) Here, we exactly know that there is no escaping to be done, hence, we don't do it.

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add-another-icons-framework that we should not add new things without applications for them

Ok, convinced. It might have been me who set this requirement....

@DL6ER DL6ER merged commit f518450 into development Jul 17, 2025
10 checks passed
@DL6ER DL6ER deleted the fix/doubly_escaped_list_links branch July 17, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants