How To Fix Buggy PHP strip_tags Function php strip_tags 함수 버그를 수정하는 방법
strip_tags() in PHP has several problems. strip_tags ()에서 php가 여러 문제를합니다. It doesn’t recognize that css within the style tags are not document text. 그것을 인식하지 못하는 스타일 태그는 문서의 텍스트에 전투 근무 지원합니다. It will not remove HTML entities or content within script tags. html 기관이나 콘텐츠를하지 않습니다 스크립트 태그를 제거합니다. strip_tags() fails for invalid HTML. strip_tags ()가 실패에 잘못된 html합니다. In short strip_tags() is not advisable to use except for trivial cases. 요컨대 strip_tags ()은 권장되지 않습니다 능률의 경우를 제외한을 사용합니다. The best solution I have come across is by uersoy at tnn dot net: 최고의 솔루션은 전체 uersoy에서 왔소이다 ② 우편 접수 : dot 네트워크 :
function html2txt($document){ $search = array('@기능을 html2txt ($ 문서) ($ 찾기 = 배열 ( '@@si', // Strip out javascript '@@ 경우 ', / / 스트립 아웃 자바 스크립트'@@siU', // Strip style tags properly '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@@ 조 ', / / 스트립 스타일 태그를 적절하게'@ <[\ / \ !]*?[^<>]*?>@ 경우 ', / / 스트립 아웃 태그'@@' // Strip multi-line comments including CDATA ); $text = preg_replace($search, '', $document); return $text; }@ '/ / 스트립 - 라인 의견 등 여러 cdata); $ 텍스트 = preg_replace ($ 검색, '', $ 문서를); 반환 $ 텍스트를;)
Filed under 밑에 Headline News 헤드 라인 뉴스 , How To 하는 방법을 , PHP php , Programming 프로그래밍 , Web 웹 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |




