diff --git a/lib/common.lib.php b/lib/common.lib.php index ac4d74ca6..804eeff73 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -239,8 +239,8 @@ function url_auto_link($str) // http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=461 // http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=463 $str = str_replace(array("<", ">", "&", """, " "), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t"), $str); - $str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1\\2", $str); $str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "\\1", $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);