mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
로직 정리
This commit is contained in:
parent
0437b3797a
commit
aecb165532
1 changed files with 12 additions and 5 deletions
|
|
@ -934,14 +934,21 @@ class editorModel extends editor
|
||||||
// Convert
|
// Convert
|
||||||
if ($converter)
|
if ($converter)
|
||||||
{
|
{
|
||||||
// To Text
|
|
||||||
if ($converter == 'text')
|
if ($converter == 'text')
|
||||||
{
|
{
|
||||||
$obj->content = escape(utf8_trim(strip_tags($obj->content)), false);
|
// Remove Tag
|
||||||
}
|
$obj->content = strip_tags($obj->content);
|
||||||
|
|
||||||
// To HTML
|
// Trim space
|
||||||
if ($converter == 'text2html')
|
$obj->content = utf8_trim($obj->content);
|
||||||
|
|
||||||
|
// Escape
|
||||||
|
$obj->content = escape($obj->content, false);
|
||||||
|
|
||||||
|
// Insert HTML line
|
||||||
|
$obj->content = nl2br($obj->content);
|
||||||
|
}
|
||||||
|
elseif ($converter == 'text2html')
|
||||||
{
|
{
|
||||||
$obj->content = Rhymix\Framework\Formatter::text2html($obj->content);
|
$obj->content = Rhymix\Framework\Formatter::text2html($obj->content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue