Skip to content

sanitize_url should not be used on QUERY_STRING #82

@codemonkeynorth

Description

@codemonkeynorth

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions