최신글 내용에 html or 이미지 테그 나오기 방지
본문
형식에 최신글 latest.skin.php 을 사용하고있는데,
dhtml으로 글을 작성하고 처음 이미지를 첨부했는데
내용부분에 이미지 테그가 나오고있습니다.
혹시 이미지 테그와 html 소스가 안나오고 정상적인 텍스트만 뽑아내는 방법이 있는지 질문드려요
소중한 답변 항상 감사합니다 ^^;
<ul class="gall_project_box">
<?php
for ($i=0; $i<count($list); $i++) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height);
if($thumb['src']) {
$thumb_url = $thumb['src'];
} else {
$thumb_url = $latest_skin_url."/img/no-image.gif";
}
?>
<li>
<a href="<?php echo $list[$i]['href']?>" class="gall_project_con" >
<div class="gall_p_bg">
<i></i>
</div>
<div class="gall_p_tit"><?=cut_str($list[$i][wr_content], 50)?></div>
<div class="gall_p_img"><img src="<?php echo $thumb['src']?>" alt="" /></div>
</a>
</li>
<?php } ?>
답변 1
<?=cut_str($list[$i][wr_content], 50)?>
수정.
<?php echo cut_str(strip_tags($list[$i][wr_content]), 50); ?>