aboutsummaryrefslogtreecommitdiff
path: root/mod/search
diff options
context:
space:
mode:
Diffstat (limited to 'mod/search')
-rw-r--r--mod/search/views/rss/search/entity.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/mod/search/views/rss/search/entity.php b/mod/search/views/rss/search/entity.php
index 8c3609fe5..a8f9ebcc4 100644
--- a/mod/search/views/rss/search/entity.php
+++ b/mod/search/views/rss/search/entity.php
@@ -9,24 +9,20 @@
* @link http://elgg.org/
*/
-$title = $vars['entity']->title;
-if (empty($title)) {
- $title = substr($vars['entity']->description, 0, 32);
- if (strlen($vars['entity']->description) > 32) {
- $title .= " ...";
- }
+if (!array_key_exists('entity', $vars) || !($vars['entity'] instanceof ElggEntity)) {
+ return FALSE;
}
+// title cannot contain HTML but descriptions can.
+$title = strip_tags($vars['entity']->getVolatileData('search_matched_title'));
+$description = $vars['entity']->getVolatileData('search_matched_description');
+
?>
<item>
-<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
-<pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
-<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
-<title><![CDATA[<?php echo $title; ?>]]></title>
-<description><![CDATA[<?php
- $summary = $vars['entity']->summary;
- if (!empty($summary)) echo wpautop($summary);
- echo (autop($vars['entity']->description));
-?>]]></description>
+ <guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
+ <pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
+ <link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo $description; ?>]]></description>
</item>