WordPress 3.3.1 removes JavaScript from 'a' tags but 3.2.1 didn't
-
Hi
I upgraded from 3.2.1 to 3.3.1 and now find that WordPress strips the onclick attributes from my posts. How do I stop it doing this?
I create my posts using an admin account via XML-RPC. My posts should contain
<a href="javascript_required.html" onclick='try { show_map_and_markers("20111118modelc", "master", ["re526"]) } catch (e) {}; return false;' title="re526"><img border='0' src="/map_icons/misc/map.png" alt='map'></a>
With WordPress 3.2.1 the post is created as I wish. See http://clickmap.curie.fr/annotations/20111118modelc/2011/12/12/re526/
With WordPress 3.3.1 I just get:
<a href="javascript_required.html" title="re526"><img border='0' src="/map_icons/misc/map.png" alt='map'></a>
See this post for an example http://navicell-dev.curie.fr/annotations/20111118modelc/re526/
I have read http://codex.wordpress.org/Using_Javascript and have installed the “Text Control” plugin on my 3.3.1 server. I tried the “You Can Javascript” plugin but that didn’t help and the plugin is not listed as being compatible with 3.3.
I need to be able to call a Javascript function when a user clicks on a link. This function requires arguments which are different for each link.
thanks for any ideas, Stuart
- The topic ‘WordPress 3.3.1 removes JavaScript from 'a' tags but 3.2.1 didn't’ is closed to new replies.