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

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