summaryrefslogtreecommitdiff
path: root/bin/html2text.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-04-28 18:07:12 +0000
committerthomascube <thomas@roundcube.net>2007-04-28 18:07:12 +0000
commitf1154163b0a9efb21d722bc658352739040ffd61 (patch)
tree28ccaa50bc27fa2c3d10eb8650a9862710668494 /bin/html2text.php
parent9e5d051e97441794d765b094ed46d8cc732c3944 (diff)
Merged branch devel-addressbook from r443 back to trunk
Diffstat (limited to 'bin/html2text.php')
-rw-r--r--bin/html2text.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/html2text.php b/bin/html2text.php
new file mode 100644
index 000000000..e0e2679f7
--- /dev/null
+++ b/bin/html2text.php
@@ -0,0 +1,16 @@
+<?php
+
+require_once('../program/lib/html2text.inc');
+
+$htmlText = $HTTP_RAW_POST_DATA;
+$converter = new html2text($htmlText);
+
+header('Content-Type: text/plain; charset=UTF-8');
+$plaintext = $converter->get_text();
+
+if (function_exists('html_entity_decode'))
+ print html_entity_decode($plaintext, ENT_COMPAT, 'UTF-8');
+else
+ print $plaintext;
+
+?> \ No newline at end of file