Title: Error with WYSIWYG javascript
Last modified: August 21, 2016

---

# Error with WYSIWYG javascript

 *  Resolved [JAAcker](https://wordpress.org/support/users/jaacker/)
 * (@jaacker)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/error-with-wysiwyg-javascript/)
 * 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/](http://wordpress.org/plugins/tinymce-advanced/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/error-with-wysiwyg-javascript/#post-4461642)
 * 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).

Viewing 1 replies (of 1 total)

The topic ‘Error with WYSIWYG javascript’ is closed to new replies.

 * ![](https://ps.w.org/tinymce-advanced/assets/icon-256x256.png?rev=971511)
 * [Advanced Editor Tools](https://wordpress.org/plugins/tinymce-advanced/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tinymce-advanced/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tinymce-advanced/)
 * [Active Topics](https://wordpress.org/support/plugin/tinymce-advanced/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tinymce-advanced/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tinymce-advanced/reviews/)

## Tags

 * [javascript issue](https://wordpress.org/support/topic-tag/javascript-issue/)

 * 1 reply
 * 2 participants
 * Last reply from: [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/error-with-wysiwyg-javascript/#post-4461642)
 * Status: resolved