8000 Privacy plugin: more accurate pattern to capture external links by emaheuxPEREN · Pull Request #8542 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@emaheuxPEREN
Copy link
Contributor

Use a more accurate pattern to capture external links in privacy plugin.

Fix is two-fold:

  • avoid false-positive for internal links that starts with http
  • avoid false-negative for scheme-less links, e.g. //x.y.z/

@squidfunk
Copy link
Owner
squidfunk commented Dec 11, 2025

Thanks for the PR. Please provide a minimal reproduction, so we can observe the errors this PR is trying to fix + decide whether it is worth integrating. Please note that this project is now in maintenance mode.

@emaheuxPEREN
Copy link
Contributor Author

Here you are :
9.7.0-privacy-external-links-pr8542.zip

@squidfunk
Copy link
Owner

Thanks for providing the reproduction, looks good!

@squidfunk squidfunk merged commit dde13ce into squidfunk:master Dec 18, 2025
@squidfunk
Copy link
Owner

Another fix was necessary to make protocol-relative URLs work. I'm not sure why this worked on your machine, but requests failed with being able to fetch the URL. Fixed in 79ba428.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0