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

  1. JAAcker
    Posted 2 years ago #


    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">

    The script is modify to :


    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 !


  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 2 years 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).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TinyMCE Advanced
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic