diff --git a/bbs/write.php b/bbs/write.php index 5efad03e3..39ffcbdf8 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -346,8 +346,10 @@ if ($w == '') { } for($i=0;$i<$file_count;$i++){ - if(! isset($file[$i])) { + if (!isset($file[$i])) { $file[$i] = array('file'=>null, 'source'=>null, 'size'=>null, 'bf_content' => null); + } else { + $file[$i]['bf_content'] = isset($file[$i]['bf_content']) ? htmlspecialchars($file[$i]['bf_content'], ENT_QUOTES, 'UTF-8', false) : null; } }