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

sanitize_url should not be used on QUERY_STRING #82

Open
codemonkeynorth opened this issue Sep 28, 2023 · 0 comments
Open

sanitize_url should not be used on QUERY_STRING #82

codemonkeynorth opened this issue Sep 28, 2023 · 0 comments

Comments

@codemonkeynorth
Copy link

sanitize_url will prepend http:// to the string as it expects a URL not just a querystring

see https://developer.wordpress.org/reference/functions/esc_url/#more-information

If the URL appears to be an absolute link that does not contain a scheme, prepends http://

that means if the querystring is foo=bar then this incorrectly returns http://foo=bar

use sanitize_text_field

this fixes #74

I've raised it separately as it's not specifically related to the plugin detailed in that issue.. it's affecting querystrings in general

thanks
J

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

No branches or pull requests

1 participant