“Custom GA Code” content being escaped
-
I am trying to enter some custom code into the “Custom GA Code” field but it seems to be escaping special characters when I save the settings.
For example:
if (typeof myvar !== "undefined" && myvar instanceof Array) { ... }
Gets converted to:
if (typeof myvar !== "undefined" && myvar instanceof Array) { ... }
Which is not valid JavaScript and breaks.
I suspect this is happening because you are passing the content through the
wp_kses()
function.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘“Custom GA Code” content being escaped’ is closed to new replies.