채택완료

버그 아닐까요? $html에 문자열이 안들어가네요

2014-12-08 (월) 16:15:35 3,682

버그 아닐까요? $html에 문자열이 안들어가네요

이거 어떻게 해결할 수 있을까요?

​

출처 : /plugin/editor/smarteditor2/editor.lib.php 에서...

아래를 거친 $html 결과에... 

가장 끝의 \n</script>가 안들어가고 있습니다 

제가 수정한게 아닌... 배포 그대로인데요... 이거 에러 잡을 수 있을까요?

 

    if ($is_dhtml_editor && $js) { 

        $html .= "\n".'<script src="'.$editor_url.'/js/HuskyEZCreator.js"></script>'; 
        $html .= "\n".'<script>var g5_editor_url = "'.$editor_url.'", oEditors = [];</script>'; 
        $html .= "\n".'<script src="'.$editor_url.'/config.js"></script>'; 
        $html .= "\n<script>"; 
        $html .= ' 
        $(function(){ 
            $(".btn_cke_sc").click(function(){ 
                if ($(this).next("div.cke_sc_def").length) { 
                    $(this).next("div.cke_sc_def").remove(); 
                    $(this).text("단축키 일람"); 
                } else { 
                    $(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("'.$editor_url.'/shortcut.html"); 
                    $(this).text("단축키 일람 닫기"); 
                } 
            }); 
            $(".btn_cke_sc_close").live("click",function(){ 
                $(this).parent("div.cke_sc_def").remove(); 
            }); 
        });'; 
        $html .= "\n</script>"; // <=== 여기요... 여기에서.$html 에... \n</script>가 안들어가지네요
        $js = false; 

    } 

|

답변 2개 / 댓글 2개

채택된 답변
+20 포인트

버그게시판에 올려진 글에도 답변을 드렸지만 기본 코드에서 결과 화면에 정상적으로

해당 코드가 출력되고 있습니다.

http://demo.sir.co.kr/gnuboard5/bbs/write.php?bo_table=free 

Copy
<script>        $(function(){            $(".btn_cke_sc").click(function(){                if ($(this).next("div.cke_sc_def").length) {                    $(this).next("div.cke_sc_def").remove();                    $(this).text("단축키 일람");                } else {                    $(this).after("<div class='cke_sc_def' />").next("div.cke_sc_def").load("http://demo.sir.co.kr/gnuboard5/plugin/editor/smarteditor2/shortcut.html");                    $(this).text("단축키 일람 닫기");                }            });            $(".btn_cke_sc_close").live("click",function(){                $(this).parent("div.cke_sc_def").remove();            });        });</script>

위와 같이 출력이 되고 있습니다.

답변에 대한 댓글 1개

2014-12-08 (월) 20:30:27
편리님 감사합니다^^ 이상하게.. 이클립스에서는... 그게 \n</script> 가 안들어 가지는듯... 자꾸... $(this).text("단축키 일람 닫기"); 까지만 출력되네요

문제가 되는 url을 적어 두는것이, 코드 문제로 묻는것 보다 훨씬 문제 해결에 도움이 되실 겁니다.

답변에 대한 댓글 1개

2014-12-08 (월) 20:30:38
네 감사합니다.

답변을 작성하려면 로그인이 필요합니다.