[wp-trac] Re: [WordPress Trac] #3070: use of php's "strip_tags"
gives improper/incomplete results
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 27 07:44:08 GMT 2006
#3070: use of php's "strip_tags" gives improper/incomplete results
----------------------------+-----------------------------------------------
Reporter: _ck_ | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: Administration | Version: 2.1
Severity: major | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by _ck_):
Okay part of the problem with html2txt as it is posted on php.net is the
array search order is bad. It will pass your test if you move the HTML
strip to the first item:
{{{
$search = array('@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<style[^>]*?>.*?</style>@siU', // Strip style tags
properly
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line
comments including CDATA
);
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3070>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list