改行文字の置換方法をpreg_replaceからstr_replaceに再修正

This commit is contained in:
konkon-fox 2023-10-19 21:57:30 +09:00
parent 922b573b4a
commit 59c51167e4
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ function escapePostData(&$postData, $keepNewLine){
$postData = preg_replace('/&#[xX]0*[aAdD];/', ' ', $postData);
// 改行コードをエスケープ ※本文のみ<br>に変換
$newLineChar = $keepNewLine ? '<br>' : ' ';
$postData = preg_replace('/(\r\n|\r|\n)/', $newLineChar, $postData);
$postData = str_replace(array("\r\n","\r","\n"), $newLineChar, $postData);
// trim
$postData = trim($postData);
}