정보 검색했을 때 html 태그 없애기
페이지 정보
본문
bbs/search.php 파일 수정
수정전 181 줄
// 비밀글은 검색 불가
if (strstr($row[wr_option].$row2[wr_option], "secret"))
$row[wr_content] = "[비밀글 입니다.]";
$subject = get_text($row[wr_subject]);
if (strstr($sfl, "wr_subject"))
$subject = search_font($stx, $subject);
if ($read_level[$idx] <= $member[mb_level])
{
$content = cut_str(get_text($row[wr_content]),300,"…");
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
}
else
$content = '';
수정후
// 비밀글은 검색 불가
if (strstr($row[wr_option].$row2[wr_option], "secret"))
$row[wr_content] = "[비밀글 입니다.]";
$subject = get_text($row[wr_subject]);
if (strstr($sfl, "wr_subject"))
$subject = search_font($stx, $subject);
if ($read_level[$idx] <= $member[mb_level])
{
$row[wr_content]= strip_tags($row[wr_content]); // 검색 페이지 태그 노출 방지
$content = cut_str(get_text($row[wr_content]),300,"…");
$content = cut_str(conv_content($row[wr_content],2),300,"…");// 검색 페이지 태그 노출 방지
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
}
else
$content = '';
수정전
수정후
[출처] 마이위트 - http://g4.miwit.com/bbs/board.php?bo_table=g4_tiptech&wr_id=177
왕초보입니다. 많은 지도편달 부탁드립니다~^^
자주 가는 곳 : SIR
댓글목록
등록된 댓글이 없습니다.