Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Content Editor Discussions /

Forum for content editors and CMS users.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

TinyMCE editor striping code in SS 2.3.7

Go to End

2 Posts   1412 Views

Chip Designs

Community Member, 15 Posts

16 April 2010 at 7:57pm

Edited: 16/04/2010 7:58pm

I have currently upgraded my SS from 2.3.3 to 2.3.7. My TinyMCE editor is striping code from the html - it did however use to work by modifying the cms/code/LeftAndMain.php in SS 2.3.3 as i have done so below.

Example code:
<script type="text/javascript" src=""></script>
<br /><a href="">weather radar</a>

I have changed the cms/_config.php file by changing:

'valid_elements' => "+a[id|...etc
'valid_elements' => "*",

Now when i add the code, the editor is leaving the <script> tags behind but is striping the 'type' and 'src' from the <script> tag rendering it useless. I think I am on the right track and have read many, many threads on this matter, but there are not many for versions of SS 2.3+. I have looked at the cms/javascript/LeftAndMain.js file but can't see anything that should be causing issues.

Any ideas?


Chip Designs

Community Member, 15 Posts

16 April 2010 at 10:31pm