Conflict with AMP plugin?
-
Hi there, on the bottom of my AMP pages ( using this plugin https://ww.wp.xz.cn/plugins/amp/ ), there is a <script> tag in the footer which is causing AMP validation errors:
Error:
The tag 'script' is disallowed except in specific forms.The script tag:
<script>function lc_get_cookie(name) {var c = document.cookie;if (c.indexOf(name) != -1) {var x = c.indexOf(name)+name.length+1;var y = c.indexOf(";",x);if (y < 0) y = c.length;return decodeURIComponent(c.substring(x,y));} else return "";}if ((d = document.getElementById("commentform")) != null) { e = d.elements;var z = lc_get_cookie("comment_author_email_a2d6fbd4bfc2bdb09f5c7cdc8b76e612");if (z != "") e["email"].value = z;z = lc_get_cookie("comment_author_a2d6fbd4bfc2bdb09f5c7cdc8b76e612");if (z != "") e["author"].value = z.replace(/\+/g, " ");z = lc_get_cookie("comment_author_url_a2d6fbd4bfc2bdb09f5c7cdc8b76e612");if (z != "") e["url"].value = z;}</script>Can this be disabled for AMP pages? There doesn’t seem to be a way to do this using the bypass rules.
Thanks!
Patrick
The topic ‘Conflict with AMP plugin?’ is closed to new replies.