[geeklog-cvs] geeklog: Fixed a problem with words being merged together in new...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Mar 4 08:15:32 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3b4d3b5170dc
changeset: 6817:3b4d3b5170dc
user:      Dirk Haun <dirk at haun-online.de>
date:      Wed Mar 04 14:15:22 2009 +0100
description:
Fixed a problem with words being merged together in newsfeeds when the article was written with CR as the line separator

diffstat:

2 files changed, 6 insertions(+), 3 deletions(-)
public_html/docs/history   |    2 ++
system/lib-syndication.php |    7 ++++---

diffs (43 lines):

diff -r a28d8b6202c4 -r 3b4d3b5170dc public_html/docs/history
--- a/public_html/docs/history	Wed Mar 04 14:08:02 2009 +0100
+++ b/public_html/docs/history	Wed Mar 04 14:15:22 2009 +0100
@@ -11,6 +11,8 @@
 + (TBD) Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
+- Fixed a problem with words being merged together in newsfeeds when the article
+  was written with CR as the line separator [Dirk]
 - Made url rewriting work on setups that only set $_SERVER['ORIG_PATH_INFO']
   (bug #0000816)
 - Fixed duplicate plugin entries when a plugin has more than one entry for the
diff -r a28d8b6202c4 -r 3b4d3b5170dc system/lib-syndication.php
--- a/system/lib-syndication.php	Wed Mar 04 14:08:02 2009 +0100
+++ b/system/lib-syndication.php	Wed Mar 04 14:15:22 2009 +0100
@@ -270,7 +270,7 @@
             $storytext = SYND_truncateSummary( $fulltext, $contentLength );
 
             $fulltext = trim( $fulltext );
-            $fulltext = str_replace("\015", '', $fulltext);
+            $fulltext = str_replace(array("\015\012", "\015"), "\012", $fulltext);
 
             if( $row['postmode'] == 'plaintext' ) 
             {
@@ -403,7 +403,8 @@
         $fulltext = PLG_replaceTags( $fulltext );
         $storytext = SYND_truncateSummary( $fulltext, $contentLength );
         $fulltext = trim( $fulltext );
-        $fulltext = str_replace("\015", '', $fulltext);
+COM_errorLog($fulltext);
+        $fulltext = str_replace(array("\015\012", "\015"), "\012", $fulltext);
 
         if( $row['postmode'] == 'plaintext' ) 
         {
@@ -631,7 +632,7 @@
     {
         $text = stripslashes( $text );
         $text = trim( $text );
-        $text = str_replace("\015", '', $text);
+        $text = str_replace(array("\015\012", "\015"), "\012", $text);
         if(( $length > 3 ) && ( MBYTE_strlen( $text ) > $length ))
         {
             $text = substr( $text, 0, $length - 3 ) . '...';



More information about the geeklog-cvs mailing list