From 70dafccc9b4cdef58a559fc8fa5ec640bf13af1d Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 12 Jan 2010 02:52:25 +0000 Subject: Cleaned up RSS entity view for search a bit. git-svn-id: http://code.elgg.org/elgg/trunk@3801 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/views/rss/search/entity.php | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'mod/search/views/rss/search/entity.php') 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'); + ?> -getURL()); ?> -time_created) ?> -getURL()); ?> -<![CDATA[<?php echo $title; ?>]]> -summary; - if (!empty($summary)) echo wpautop($summary); - echo (autop($vars['entity']->description)); -?>]]> + getURL()); ?> + time_created) ?> + getURL()); ?> + <![CDATA[<?php echo $title; ?>]]> + ]]> -- cgit v1.2.3