From cbab7c7fa89aaaa939632a87135d158e6616b0e3 Mon Sep 17 00:00:00 2001
From: james
Date: Tue, 30 Mar 2010 04:39:56 +0000
Subject: [PATCH] also convert an ending into a newline when converting
html to text
---
common.inc.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common.inc.php b/common.inc.php
index 4f7ed1d..7ed8127 100644
--- a/common.inc.php
+++ b/common.inc.php
@@ -1306,6 +1306,8 @@ function format_duration($seconds, $granularity = 2)
function getTextFromHtml($html) {
//first, replace an
with
$text=str_replace("","
",$html);
+ //next, replace a with
+ $text=str_replace("","
",$html);
//now replace any
with newlines
$text=eregi_replace('
',chr(13).chr(10),$text);
//and strip the rest of the tags