summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorChristian Schneider2008-11-04 14:01:58 +0000
committerChristian Schneider2008-11-04 14:01:58 +0000
commit5ceb7642fac777226ca0462bb74c299dd2e397b9 (patch)
treec63617387872ca0683862704e07ce72c654f6e30 /it_html.class
parent066062809369b5c3185bc0636d08bff7fc434892 (diff)
downloaditools-5ceb7642fac777226ca0462bb74c299dd2e397b9.tar.gz
itools-5ceb7642fac777226ca0462bb74c299dd2e397b9.tar.bz2
itools-5ceb7642fac777226ca0462bb74c299dd2e397b9.zip
Simplify regex and make sure test catches CR
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 6da0b62..75ebe9b 100644
--- a/it_html.class
+++ b/it_html.class
@@ -374,7 +374,7 @@ function select($tags, $options, $selected = null)
function sanitize($html)
{
$result = "";
- $html = it::replace(array('[\0\n\r\s]+' => " "), $html);
+ $html = it::replace(array('[\0\s]+' => " "), $html); # \s also matches \r and \n
$urlpattern = 'https?://[^">]+';
if ($tag = it::match("(.*)<(div|p|i|b)[^>]*>(.*?)</\\2>(.*)", $html))