summaryrefslogtreecommitdiff
path: root/roundcubemail/program/lib/html2text.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-22 18:27:25 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-22 18:27:25 +0000
commited39505e00f9db64f1f029f07a320bd2cd142ccd (patch)
tree5ea91e6de5b1359cace8ec501a6f35efbbd22ca2 /roundcubemail/program/lib/html2text.php
parent14c96c91633a50e1e08cef65f1d1f794958eee4a (diff)
#1485640: http://pear.php.net/bugs/bug.php?id=13032
#1485640: html2text: move html_entity_decode() after preg_replace() git-svn-id: https://svn.roundcube.net/trunk@2186 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/html2text.php')
-rw-r--r--roundcubemail/program/lib/html2text.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/lib/html2text.php b/roundcubemail/program/lib/html2text.php
index d298ee2e4..e2a5b241e 100644
--- a/roundcubemail/program/lib/html2text.php
+++ b/roundcubemail/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);