TinyMCE: only apply HTML parsing if we actually got into JS and poked the editor widget. With JS off, we'll take plaintext as usual.
This commit is contained in:
parent
527561cd93
commit
3c28464dab
|
@ -117,9 +117,11 @@ class TinyMCEPlugin extends Plugin
|
|||
*/
|
||||
function onStartSaveNewNoticeWeb($action, $user, &$content, &$options)
|
||||
{
|
||||
$html = $this->sanitizeHtml($action->arg('status_textarea'));
|
||||
$options['rendered'] = $html;
|
||||
$content = $this->stripHtml($html);
|
||||
if ($action->arg('richedit')) {
|
||||
$html = $this->sanitizeHtml($content);
|
||||
$options['rendered'] = $html;
|
||||
$content = $this->stripHtml($html);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -145,8 +147,11 @@ class TinyMCEPlugin extends Plugin
|
|||
theme_advanced_resizing : true,
|
||||
tabfocus_elements: ":prev,:next"
|
||||
});
|
||||
$('#form_notice').append('<input type="hidden" name="richedit" value="1">');
|
||||
$('#notice_action-submit').click(function() {
|
||||
tinymce.triggerSave();
|
||||
if (typeof tinymce != "undefined") {
|
||||
tinymce.triggerSave();
|
||||
}
|
||||
});
|
||||
});
|
||||
END_OF_SCRIPT;
|
||||
|
|
Loading…
Reference in New Issue
Block a user