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

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

Open
JiveDig opened this issue Dec 15, 2020 · 0 comments

Comments

@JiveDig
Copy link

JiveDig commented Dec 15, 2020

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

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