From df97fa71a04abba7abb92e8702a6209fb5740dcf Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 3 Jul 2017 19:03:05 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=B3=B8?= =?UTF-8?q?=EB=AC=B8=EC=9D=98=20url=20=EC=9E=90=EB=8F=99=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EC=86=8C=EC=8A=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 3da20636f..fade7b145 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -216,7 +216,7 @@ function url_auto_link($str) // http://sir.kr/pg_lecture/463 $str = str_replace(array("<", ">", "&", """, " ", "'"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"), $str); //$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "\\1", $str); - $str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1\\2", $str); + $str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#!=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1\\2", $str); $str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1\\2", $str); $str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "\\0", $str); $str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array(" ", "<", ">", "'"), $str);