Retain script tags in editor if allowed (fixes #3611)

TinyMCE strips them by default, but if they're specifically added
to the allowed elements we should respect that setting.

Example PHP config:
$validEls = HtmlEditorConfig::get('cms')->getOption('extended_valid_elements');
$validEls .= ',script[src|type]';
HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', $validEls);