게시글 작성 때 필터링 대소문자 구분하지 않도록 수정

This commit is contained in:
chicpro
2014-12-05 09:29:13 +09:00
parent 8c0b7e45de
commit b608efa5da

View File

@ -1,8 +1,8 @@
<?php
include_once('./_common.php');
$subject = strtolower($_POST['subject']);
$content = strtolower(strip_tags($_POST['content']));
$subject = strip_tags($_POST['subject']);
$content = strip_tags($_POST['content']);
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
@ -12,7 +12,7 @@ for ($i=0; $i<count($filter); $i++) {
// 제목 필터링 (찾으면 중지)
$subj = "";
$pos = strpos($subject, $str);
$pos = stripos($subject, $str);
if ($pos !== false) {
$subj = $str;
break;
@ -20,7 +20,7 @@ for ($i=0; $i<count($filter); $i++) {
// 내용 필터링 (찾으면 중지)
$cont = "";
$pos = strpos($content, $str);
$pos = stripos($content, $str);
if ($pos !== false) {
$cont = $str;
break;