Skip to content

Consider escaping button_url with esc_url_raw instead of esc_url for query args. #17

Description

@JiveDig

I'm planning to add an upsell in our theme and add some Google Tag Manager utm query args. Using esc_url() replaces entities for display the & in the url.

I'm not sure this is an issue with GTM, but knowing how finicky things have been in the past I'm leery to have anything but exactly what they ask for in the URL.

I have https://example.com/?utm_source=engine&utm_medium=customizer&utm_campaign=mt-plugins (via add_query_arg)

esc_url gives: https://bizbudding.com/product-category/plugins?utm_source=engine&utm_medium=customizer&utm_campaign=mt-plugins

esc_url_raw gives: https://example.com/?utm_source=engine&utm_medium=customizer&utm_campaign=mt-plugins

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions