WordPress.org

Ready to get started?Download WordPress

Forums

TinyMCE Advanced
[resolved] Error with WYSIWYG javascript (2 posts)

  1. JAAcker
    Member
    Posted 6 months ago #

    Hello,

    When I write a javascript in text mode, my script is automatically modify by tinyMCE editor so I'm facing an issue.

    For example, I write the script :

    <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false">
    </script>

    The script is modify to :

    &nbsp;

    Now, I write the same script without the line feed :

    <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false"></script>

    The script is modify to (& modify to &amp;) :

    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&amp;sensor=false"></script>

    Is there any way to solve this issue ?

    Thanks in advance !

    http://wordpress.org/plugins/tinymce-advanced/

  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 6 months ago #

    The problem with the first example seems to be that the <script> tag is "empty". TinyMCE 3.5 expects some content in it and wraps it in <![CDATA[ so some browsers don't mangle it in contenteditable mode. Having only a single line break doesn't seem to work.

    The replacement of & with &apm in HTML tag attributes (like script src) is a requirement for both XHTML and HTML5 (if I remember correctly).

Reply

You must log in to post.

About this Plugin

About this Topic