Skip to content

Conversation

doubleswirve
Copy link

Removes some extraneous calls to esc_js in the amp_post_template_analytics filter callback as the nested config_data array is already JSON encoded, when printed out to the page, in the AMP plugin:

Also the esc_js calls don't seem to be as useful since the output goes to the contents of a application/json script element (i.e., not inline JavaScript):

Escapes text strings for echoing in JS. It is intended to be used for inline JS (in a tag attribute, for example onclick="…")

https://developer.wordpress.org/reference/functions/esc_js/

Thanks!

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.

1 participant