From 7c6335fb470a2e1f45d9feba4078ad25d0b0585e Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 18 Nov 2013 13:34:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?preg=5Freplace=20=EC=97=90=20/u=20-=20unico?= =?UTF-8?q?de=20safe=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbs/search.php b/bbs/search.php index ae1a6d8fb..97662e56a 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -11,7 +11,7 @@ $text_stx = ""; $srows = 0; $stx = strip_tags($stx); -$stx = preg_replace('/[[:punct:]]/', '', $stx); // 특수문자 제거 +$stx = preg_replace('/[[:punct:]]/u', '', $stx); // 특수문자 제거 if ($stx) { $stx = preg_replace('/\//', '\/', trim($stx)); $sop = strtolower($sop); From cb3e4a55cd5f14959ef945c563b19fbf6b88e51d Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 18 Nov 2013 13:45:13 +0900 Subject: [PATCH 2/2] =?UTF-8?q?euc-kr=20referer=20=EB=A5=BC=20utf-8=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=ED=99=98=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/visit_search.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/adm/visit_search.php b/adm/visit_search.php index 85d30569b..466d2f711 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -98,15 +98,8 @@ $listall = '처음'; //페이지 처음 $referer = get_text(cut_str($row[vi_referer], 255, "")); $referer = urldecode($referer); - if (strtolower($g4['charset']) == 'utf-8') { - if (!is_utf8($referer)) { - $referer = iconv('euc-kr', 'utf-8', $referer); - } - } - else { - if (is_utf8($referer)) { - $referer = iconv('utf-8', 'euc-kr', $referer); - } + if (!is_utf8($referer)) { + $referer = iconv('euc-kr', 'utf-8', $referer); } $title = str_replace(array("<", ">"), array("<", ">"), $referer);