1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-12 18:46:20 +02:00

Clean empty TinyMce content when saving to database.

This commit is contained in:
Cameron
2014-06-16 18:18:29 -07:00
parent 2d9ef8629d
commit 5cbb38ad7f

View File

@ -89,7 +89,12 @@ if($_POST['mode'] == 'tobbcode')
$content = updateImg($content);
$content = $tp->parseBBTags($content,true); // replace html with bbcode equivalent
echo ($content) ? "[html]".$content."[/html]" : ""; // Add the tags before saving to DB.
if(strip_tags($content, '<i>') == '&nbsp;') // Avoid this: [html]<p>&nbsp;</p>[/html]
{
exit;
}
echo $content ? "[html]".$content."[/html]" : ""; // Add the tags before saving to DB.
}
else // bbcode Mode. //XXX Disabled at the moment in tinymce/e_meta.php - post_html is required to activate.
{