diff options
author | alecpl <alec@alec.pl> | 2008-12-22 18:27:25 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-12-22 18:27:25 +0000 |
commit | 4e0419b9cb984249b823e9484a2d63eb74fd156c (patch) | |
tree | 7651bd3aa3736858d877a83829558b1e61f3efbd /program/lib/html2text.php | |
parent | 0fc97c2833b2254b391bb741b3262f86569c5938 (diff) |
#1485640: http://pear.php.net/bugs/bug.php?id=13032
#1485640: html2text: move html_entity_decode() after preg_replace()
Diffstat (limited to 'program/lib/html2text.php')
-rw-r--r-- | program/lib/html2text.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/html2text.php b/program/lib/html2text.php index d298ee2e4..e2a5b241e 100644 --- a/program/lib/html2text.php +++ b/program/lib/html2text.php @@ -468,13 +468,13 @@ class html2text // Convert <PRE> $this->_convert_pre($text); - // Replace known html entities - $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); - // Run our defined search-and-replace $text = preg_replace($this->search, $this->replace, $text); $text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text); + // Replace known html entities + $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); + // Strip any other HTML tags $text = strip_tags($text, $this->allowed_tags); |