summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-22 18:58:47 +0000
committeralecpl <alec@alec.pl>2010-06-22 18:58:47 +0000
commit5a74dc8ade7956d3f29af57fd5ba8466b608e732 (patch)
tree430f12320c3f586fd28f4d3ffe6fff756081625b /program/lib
parent4b96ed76a96602215bb75208d6b01473ebef09b8 (diff)
- Fix regular expression for HTML entities
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/html2text.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/html2text.php b/program/lib/html2text.php
index 572942e21..9c5267f62 100644
--- a/program/lib/html2text.php
+++ b/program/lib/html2text.php
@@ -476,7 +476,7 @@ class html2text
$text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text);
// Remove unknown/unhandled entities (this cannot be done in search-and-replace block)
- $text = preg_replace('/&[^&;]+;/i', '', $text);
+ $text = preg_replace('/&#?[a-z0-9]{2,7};/i', '', $text);
// Strip any other HTML tags
$text = strip_tags($text, $this->allowed_tags);