그누보드 5.0.23 수정 내역 적용
This commit is contained in:
@ -141,7 +141,7 @@ function get_cookie($cookie_name)
|
||||
{
|
||||
$cookie = md5($cookie_name);
|
||||
if (array_key_exists($cookie, $_COOKIE))
|
||||
return base64_decode($_COOKIE[md5($cookie_name)]);
|
||||
return base64_decode($_COOKIE[$cookie]);
|
||||
else
|
||||
return "";
|
||||
}
|
||||
@ -214,11 +214,12 @@ function url_auto_link($str)
|
||||
// 140326 유창화님 제안코드로 수정
|
||||
// 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("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
|
||||
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
|
||||
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href='mailto:\\0'>\\0</a>", $str);
|
||||
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t"), array(" ", "<", ">"), $str);
|
||||
$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()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
|
||||
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
|
||||
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
|
||||
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\">\\0</a>", $str);
|
||||
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array(" ", "<", ">", "'"), $str);
|
||||
|
||||
/*
|
||||
// 속도 향상 031011
|
||||
@ -483,7 +484,7 @@ function search_font($stx, $str)
|
||||
// 제목을 변환
|
||||
function conv_subject($subject, $len, $suffix='')
|
||||
{
|
||||
return cut_str(get_text($subject), $len, $suffix);
|
||||
return get_text(cut_str($subject, $len, $suffix));
|
||||
}
|
||||
|
||||
// 내용을 변환
|
||||
@ -528,7 +529,6 @@ function conv_content($content, $html, $filter=true)
|
||||
$content = str_replace("\n ", "\n ", $content);
|
||||
|
||||
$content = get_text($content, 1);
|
||||
|
||||
$content = url_auto_link($content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user