mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
nohtml 에디터에서 <br>태그는 예외로 줄바꿈
This commit is contained in:
parent
51ecf43079
commit
3d48844ca8
2 changed files with 8 additions and 8 deletions
|
|
@ -299,9 +299,9 @@ class documentController extends document
|
|||
|
||||
if(strpos($editor_config->sel_editor_colorset, 'nohtml') !== FALSE)
|
||||
{
|
||||
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
|
||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
$obj->content = nl2br($obj->content);
|
||||
$obj->content = preg_replace('/\r|\n/', '', $obj->content);
|
||||
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -515,9 +515,9 @@ class documentController extends document
|
|||
|
||||
if(strpos($editor_config->sel_editor_colorset, 'nohtml') !== FALSE)
|
||||
{
|
||||
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
|
||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
$obj->content = nl2br($obj->content);
|
||||
$obj->content = preg_replace('/\r|\n/', '', $obj->content);
|
||||
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue