preg_replace 로 게시물 스타일 태그 제거
-
아니꼬운군대
- 0건
- 112회
- 08-09-26 10:56
preg_replace 로 게시물 스타일시트를 제거 하려고 합니다.
아래와 같이 처리 하면 잘 처리 되어는데요.
$content = preg_replace("!<style(.*?)<\/style>!is", '', $content);
아래의 스타일 처럼 들어가면 적용이 안되네요
답변 부탁 합니다.
== 문제의 스타일 ======================================
<STYLE> body {background-image:url(http://blogfiles7.naver.net/data17/2006/7/4/102/5_1147903815-coco767.gif); background-attachment: fixed; background-repeat: repeat; background-position: bottom right;} table { background-color: transparent
; } td { background-color: transparent; }<STYLE>
=====================================================
아래와 같이 처리 하면 잘 처리 되어는데요.
$content = preg_replace("!<style(.*?)<\/style>!is", '', $content);
아래의 스타일 처럼 들어가면 적용이 안되네요
답변 부탁 합니다.
== 문제의 스타일 ======================================
<STYLE> body {background-image:url(http://blogfiles7.naver.net/data17/2006/7/4/102/5_1147903815-coco767.gif); background-attachment: fixed; background-repeat: repeat; background-position: bottom right;} table { background-color: transparent
; } td { background-color: transparent; }<STYLE>
=====================================================
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
등록된 댓글이 없습니다.