summaryrefslogtreecommitdiff
path: root/program/lib/html2text.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-20 10:29:34 +0000
committeralecpl <alec@alec.pl>2008-11-20 10:29:34 +0000
commit300fc65a461ce37999e3f0df991b24ed1b3c1bd3 (patch)
tree7d0b57759414b710f7cc48e58fa2abf65c456003 /program/lib/html2text.php
parent322b79db06cfd0d9a0ca5c63536c36265d5ce7d2 (diff)
- Better HTML entities conversion in html2text (#1485519)
Diffstat (limited to 'program/lib/html2text.php')
-rw-r--r--program/lib/html2text.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/lib/html2text.php b/program/lib/html2text.php
index 4180cac28..938dfecfe 100644
--- a/program/lib/html2text.php
+++ b/program/lib/html2text.php
@@ -232,7 +232,7 @@ class html2text
'--',
'-',
'*',
- '£',
+ '£',
'EUR', // Euro sign. € ?
'', // Unknown/unhandled entities
' ' // Runs of spaces, post-handling
@@ -465,7 +465,10 @@ 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);