팝업레이어 newwin.inc.php 파일을 열어보면 컨텐츠를 출력해주는 곳에 conv_content 이함수가
들어가 있는데요.
이거를 빼면 스크립트같은것들이 출력이되는데 있으면 출력이안되요...
이거를 빼고싶은데 이놈이 어떤기능을 하는함수고 빼면 무슨 문제가 생기는지 알고싶어요,,,
고수님들 알려주세요
답변 2개
채택된 답변
+20 포인트
PHPㅡASP프로그래머
10년 전
내용 입력 항목에서 HTML, 줄바꿈 등을 적용해주는 함수입니다.
따라서 함수를 빼면 HTML, 줄바꿈 등이 적용되지 않게 됩니다.
/lib/common.lib.php 파일 490~536 라인에서 conv_content 함수를 확인하실 수 있습니다.
Copy
// 내용을 변환function conv_content($content, $html, $filter=true){ global $config, $board; if ($html) { $source = array(); $target = array(); $source[] = "//"; $target[] = ""; if ($html == 2) { // 자동 줄바꿈 $source[] = "/\n/"; $target[] = "<br/>"; } // 테이블 태그의 개수를 세어 테이블이 깨지지 않도록 한다. $table_begin_count = substr_count(strtolower($content), "<table"); $table_end_count = substr_count(strtolower($content), "</table"); for ($i=$table_end_count; $i<$table_begin_count; $i++) { $content .= "</table>"; } $content = preg_replace($source, $target, $content); if($filter) $content = html_purifier($content); } else // text 이면 { // & 처리 : & 등의 코드를 정상 출력함 $content = html_symbol($content); // 공백 처리 //$content = preg_replace("/ /", " ", $content); $content = str_replace(" ", " ", $content); $content = str_replace("\n ", "\n ", $content); $content = get_text($content, 1); $content = url_auto_link($content); } return $content;}
PHPㅡASP프로그래머
10년 전
몬스님, 답변을 채택해 주셔서 감사드립니다. (_ _)
답변을 작성하려면 로그인이 필요합니다.