xss필터 함수
출처 : 스쿨프레임웍 www.phpschool.net <?php /** * 스크립트 문자 및 이벤트 치환 * * @param String $content * @return String * @author juriel */ function scriptExclusion ( $content ) { // <script ... > 또는 </script ... > 를 <script ... > 또는 </script ... > 로 치환 한다. $pattern = '/<(?=\/?script)(.*?)>/sim' ; $replacement = '<${1}>' ; $content = preg_replace ( $pattern , $replacement , $content ); $eventArr = array ( 'onabort' , 'onactivate' , 'onafterprint' , 'onafterupdate' , 'onbeforeactivate' , 'onbeforecopy' , 'onbeforecut' , 'onbeforedeactivate' , 'onbeforeeditfocus' , 'onbeforepaste' , 'onbeforeprint' , 'onbeforeunload' , 'onbeforeupdate' , 'onbegin' , 'onblur' , 'onbounce' , 'oncellchange' , 'onchange' , 'onclick' , 'oncontentready...