summaryrefslogtreecommitdiff
path: root/program/lib/html2text.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-03-19 22:36:24 +0000
committerthomascube <thomas@roundcube.net>2007-03-19 22:36:24 +0000
commit5cc4b13a0c6d32d74d0cba17feeb6c5fbceaf25f (patch)
treea4d6f4f7ea5d0a0360b7b0ead746f6b3c3b556a7 /program/lib/html2text.inc
parent86958f70d2970704e9ec6935d65e294c077143ea (diff)
Correctly parse message/rfc822; fixed html2text conversion; code cleanup
Diffstat (limited to 'program/lib/html2text.inc')
-rw-r--r--program/lib/html2text.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/lib/html2text.inc b/program/lib/html2text.inc
index eabe15c69..0ac72f7b3 100644
--- a/program/lib/html2text.inc
+++ b/program/lib/html2text.inc
@@ -112,7 +112,7 @@ class html2text
"/[\n\t]+/", // Newlines and tabs
'/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with
//'/<!-- .* -->/', // Comments -- which strip_tags might have problem a with
- '/<a href="([^"]+)"[^>]*>(.+?)<\/a>/ie', // <a href="">
+ '/<a [^>]*href="([^"]+)"[^>]*>(.+?)<\/a>/ie', // <a href="">
'/<h[123][^>]*>(.+?)<\/h[123]>/ie', // H1 - H3
'/<h[456][^>]*>(.+?)<\/h[456]>/ie', // H4 - H6
'/<p[^>]*>/i', // <P>
@@ -160,11 +160,11 @@ class html2text
'', // Non-legal carriage return
' ', // Newlines and tabs
'', // <script>s -- which strip_tags supposedly has problems with
- //'', // Comments -- which strip_tags might have problem a with
+ //'', // Comments -- which strip_tags might have problem a with
'$this->_build_link_list("\\1", "\\2")', // <a href="">
"strtoupper(\"\n\n\\1\n\n\")", // H1 - H3
- "ucwords(\"\n\n\\1\n\n\")", // H4 - H6
- "\n", // <P>
+ "ucwords(\"\n\n\\1\n\")", // H4 - H6
+ "\n\n", // <P>
"\n", // <br>
'strtoupper("\\1")', // <b>
'_\\1_', // <i>
@@ -255,7 +255,7 @@ class html2text
* @access public
* @return void
*/
- function html2text( $source = '', $from_file = false, $do_link_table = true )
+ function html2text( $source = '', $from_file = false, $produce_link_table = true )
{
if ( !empty($source) ) {
$this->set_html($source, $from_file);