mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
javascript 이벤트 제거 필터링 강화
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4716 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d5f0ec8521
commit
3703b7c6e5
1 changed files with 4 additions and 4 deletions
|
|
@ -459,16 +459,16 @@
|
|||
**/
|
||||
function removeHackTag($content) {
|
||||
// iframe 제거
|
||||
$content = preg_replace("!<iframe(.*?)<\/iframe>!is", '', $content);
|
||||
$content = preg_replace("!<iframe(.*?)<\/iframe>!is", '<iframe$1</iframe>', $content);
|
||||
|
||||
// script code 제거
|
||||
$content = preg_replace("!<script(.*?)<\/script>!is", '', $content);
|
||||
$content = preg_replace("!<script(.*?)<\/script>!is", '<script$1</script>', $content);
|
||||
|
||||
// meta 태그 제거
|
||||
$content = preg_replace("!<meta(.*?)>!is", '', $content);
|
||||
$content = preg_replace("!<meta(.*?)>!is", '<meta$1>', $content);
|
||||
|
||||
// style 태그 제거
|
||||
$content = preg_replace("!<style(.*?)<\/style>!is", '', $content);
|
||||
$content = preg_replace("!<style(.*?)<\/style>!is", '<style$1<style>', $content);
|
||||
|
||||
// XSS 사용을 위한 이벤트 제거
|
||||
$content = preg_replace_callback("!<([a-z]+)(.*?)>!is", removeJSEvent, $content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue