mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix #741 do not allow empty HTML content in document and comment
This commit is contained in:
parent
29f2f6a47f
commit
387dd1f78b
6 changed files with 49 additions and 0 deletions
|
|
@ -435,6 +435,11 @@ class documentController extends document
|
|||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
// Remove XE's own tags from the contents.
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
// Return error if content is empty.
|
||||
if (!$manual_inserted && is_empty_html_content($obj->content))
|
||||
{
|
||||
return new Object(-1, 'msg_empty_content');
|
||||
}
|
||||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
|
|
@ -670,6 +675,11 @@ class documentController extends document
|
|||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
// Remove XE's own tags from the contents.
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
// Return error if content is empty.
|
||||
if (!$manual_inserted && is_empty_html_content($obj->content))
|
||||
{
|
||||
return new Object(-1, 'msg_empty_content');
|
||||
}
|
||||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_updated)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue