나스카님의 FAQ게시판 html이 이상하게 나오네요..ㅠㅠ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

나스카님의 FAQ게시판 html이 이상하게 나오네요..ㅠㅠ 정보

나스카님의 FAQ게시판 html이 이상하게 나오네요..ㅠㅠ

본문

링크1에있는 나스카님의 faq게시판을 사용했는데,
 
링크2번처럼 게시물 리스트에서 제목을 클릭하면 html이 이상하게 먹혀져서 <br>테그가 들어가지네요..
 
그런데 상세보기에서는 정상적으로 나옵니다.
 
제목을 클릭했을 때 나오는 내용도 정상적으로 나오게 하려면 어떻게 해야하나요?
 
토글식 게시물 보기와 리스트 소스를 올릴께요..
이것으로 분석이 가능한지는 잘 모르겠네요..ㅠㅠ
 
-------------------------------------------------------------------------------
<!-- 토글식 게시물 리스트 시작 -->
 <? for ($i=0; $i<count($list); $i++) { ?>
 <tr valign=middle align=center>
  <td height='<?=$tog_ht;?>' colspan="4"></td>
  <? if ($is_category) { ?><td width="100" align="center" valign="middle"><font class=w_nasca_list><strong><?=$list[$i][ca_name]?></strong></font></td><? } ?>
    <? if ($is_checkbox) { ?><td width="40" align="center" valign="middle"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
  <td align=left>
   <?=$list[$i][reply]?>
   <?=$list[$i][icon_reply]?>
   <a href="javascript:toggle_menu('view_<?=$i?>');"><span class=w_nasca_list><strong>Q :</strong> <?=$list[$i][subject]?></span></a>
   <? if($is_admin) { ?><a href='<?=$list[$i][href]?>'><font color="#F92F8D">  [상세보기]</font></a><? } ?>    </td>
  <td width="40" align="center" valign="middle"><font class=w_font><?=$list[$i][datetime2]?></font></td>
  <td width="4"></td>
 </tr>
 <!-- 토글식 게시물 리스트 끝 -->
 
 <!-- 토글식 게시물 내용 보기 시작 -->
 <tr valign=middle align=center>
  <td colspan="4">   
   <? if ($is_category) { ?></td>
  <td align="center" valign="middle"></td><? } ?>
   <? if ($is_checkbox) { ?><td width="40" align="center" valign="middle"></td><? } ?>
  <td align=left><span id="view_<?=$i?>">
     <span class=w_list><strong>A :</strong><?=$list[$i][subject]?></span><p>
     <span class=w_nasca_list><?=nl2br($list[$i][wr_content])?></span></td>
  <td width="40" align="center" valign="middle"></td>
  <td width="4"></td>
 </tr>
 <!-- 토글식 게시물 내용 보기 끝 -->
-------------------------------------------------------------------------------------

댓글 전체

-. 관련파일 : /skin/board/faq/list.skin.php 137라인

-. 원인
게시물 작성시 html을 체크한 게시물은 list.skin.php에서 nl2br함수로 인해
자동 줄바꿈되는 현상이 나타나는데 이것은 html형태가 아닌 일반 게시물을 처리하기 위해,
통합적인 처리를 했기 때문에 발생됨.

-. 핵심 : 게시물 작성시 html에 체크한 게시물은 nl2br을 적용시키지 않고,
일반게시물인 경우만 nl2br을 적용시킴.

-. 수정할 소스코드

<!-- html 체크한 게시물과 그렇지 않은 게시물의 줄바꿈을 체크해 줌 2007.03.18 by nasca -->
<?if (strstr($list[$i][wr_option], "html")) { ?>
        <span class=w_nasca_list><?=$list[$i][wr_content]?></span></td>
<?} else { ?>
        <span class=w_nasca_list><?=nl2br($list[$i][wr_content])?></span></td>
<? } ?>

-. 주의사항 : html코드로 작성할 게시물이라면 최초 html옵션 체크시,
여타의 게시물을 작성하는 것과 마찬가지로 <br>태그가 중복으로 체크되지 않도록 함.
즉, html체크 >>> <br>태그를 적용 시키겠습니까? >>> 아니오
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT