code striping in visual editor
-
Hello,
im using the visual editor, putting in HTML code, save and publish the code and it changes it.
original code:
<script language="JavaScript"> <!-- function JumpToIt(frm) { var newPage = frm.url.options[frm.url.selectedIndex].value if (newPage != "None") { location.href=newPage } } //--> </script>
Code that is stripped
<p><script language="JavaScript"> <!-- function JumpToIt(frm) { var newPage = frm.url.options[frm.url.selectedIndex].value if (newPage != "None") { location.href=newPage } } //--> </script>
How can i keep the code of being stripped?
I have tried adding this to the functions.php and still doesnt work.
function override_mce_options($initArray) {
$opts = ‘*[*]’;
$initArray[‘valid_elements’] = $opts;
$initArray[‘extended_valid_elements’] = $opts;
return $initArray;
}
add_filter(‘tiny_mce_before_init’, ‘override_mce_options’);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘code striping in visual editor’ is closed to new replies.