mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 08:39:58 +09:00
fix line break bug document
This commit is contained in:
parent
03676ab45c
commit
014744444e
1 changed files with 2 additions and 4 deletions
|
|
@ -295,9 +295,8 @@ class documentController extends document
|
||||||
|
|
||||||
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
|
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
|
||||||
{
|
{
|
||||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
|
||||||
}
|
}
|
||||||
$obj->content = nl2br($obj->content);
|
|
||||||
}
|
}
|
||||||
// Remove iframe and script if not a top adminisrator in the session.
|
// Remove iframe and script if not a top adminisrator in the session.
|
||||||
if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content);
|
if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content);
|
||||||
|
|
@ -504,9 +503,8 @@ class documentController extends document
|
||||||
|
|
||||||
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
|
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
|
||||||
{
|
{
|
||||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
|
||||||
}
|
}
|
||||||
$obj->content = nl2br($obj->content);
|
|
||||||
}
|
}
|
||||||
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
||||||
if($source_obj->get('lang_code') != Context::getLangType())
|
if($source_obj->get('lang_code') != Context::getLangType())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue