From c2c7f4357c981b476a4c7e6526fb54c30a47a616 Mon Sep 17 00:00:00 2001
From: Garvin Hicking <mail@garv.in>
Date: Wed, 11 Apr 2007 10:17:10 +0000
Subject: [PATCH] Strip tags from comments also in RSS-Feeds for comments,
 thanks to tmix from the forums (garvinhicking)

---
 docs/NEWS                     | 3 +++
 include/functions_rss.inc.php | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/docs/NEWS b/docs/NEWS
index ee0cd8fe..c1a0a1d7 100644
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * Strip tags from comments also in RSS-Feeds for comments, thanks to
+      tmix from the forums (garvinhicking)
+
     * Patch #1697590: Proper directory name of SQLite DB-error messages,
       thanks to Thijs Kinkhorst
 
diff --git a/include/functions_rss.inc.php b/include/functions_rss.inc.php
index 451b2c7b..c5337a9b 100644
--- a/include/functions_rss.inc.php
+++ b/include/functions_rss.inc.php
@@ -49,6 +49,9 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
                     $entry['author'] .= ' - ' . $entry['ctitle'];
                 }
                 $entry['title'] = (!empty($entry['author']) ? $entry['author'] : ANONYMOUS) . ': ' . $entry['title'];
+                
+                // No HTML allowed here:
+                $entry['body'] = strip_tags($entry['body']);
             }
 
             // Embed a link to extended entry, if existing