Script tags in TinyMCE fields are not saving correctly
html, javascript, php, tinymce
Solution
Try the following:
`extended_valid_elements: 'script[language|type|src]'`
I see that you've already tried updating the `extended_valid_elements` property using
`'script[language|type]'` but you forgot to allow the src attribute for the script tags
so right now the `src` attribute is being stripped out.
Problem
I am running tinyMCE on my site and I'm trying to insert script tags. I am trying to insert my script tags into the body of the source of the tinyMCE instance. However, when I do I get problems. When I submit the form including the tinyMCE element It strips the tags. I have tried the following lines below with still no success. - `allow_script_urls: true` - `valid_elements : '*[*]'` - `extended_valid_elements: 'script[language|type]'` One thing I have noticed though that if I have to post the script code to the section of the source code of the tinymce instance and it works. However, I need to be able to add it to the `<body>` of the tinymce instance so I can see previews etc of it. Below is the script tag I'm trying to upload. ``` <script type="text/javascript" src="http://resources.32red.com/ad.aspx?pid=237638&bid=3344"></script> ``` Can anyone shed any light on this? Thanks