WP is stripping javascript function call in href tag & inline css from page
-
As the subject says… WordPress is stripping javascript function call in href tag, and inline css but only when the page is saved by another user (who only uses Visual Editor).
Anyone know how to prevent this? It’s damn annoying having to retype 8 instances of the below code every time someone else changes a word on the page.
<a href="javascript:showHide('someID');">More info ?</a> <div id="someID" style="display: none;"> blah blah blah </div>
After another editor saves this page, having made some minor edit with the Visual Editor (not touching the sections with the above code) the code is changed to this:
<a href="showHide(">More info ?</a> <div> blah blah blah </div>
Which is just junk of course… is there a way to prevent this behavior?
- The topic ‘WP is stripping javascript function call in href tag & inline css from page’ is closed to new replies.