]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Stripping tags to remove HTML on title and description for comment search.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 16:56:39 +0000 (16:56 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 16:56:39 +0000 (16:56 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3722 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/search/search_hooks.php

index 89d4f1dbd2d5e93259563ac8840880b90c37bd45..e5605670185cddaa9cfec1665d3ceb866f8737c0 100644 (file)
@@ -188,14 +188,14 @@ function search_tags_hook($hook, $type, $value, $params) {
                }
 
                // Nick told me my idea was dirty, so I'm hard coding the numbers.
-               $title_tmp = $entity->title;
+               $title_tmp = strip_tags($entity->title);
                if (elgg_strlen($title_tmp) > 297) {
                        $title_str = elgg_substr($title_tmp, 0, 297) . '...';
                } else {
                        $title_str = $title_tmp;
                }
 
-               $desc_tmp = $entity->description;
+               $desc_tmp = strip_tags($entity->description);
                if (elgg_strlen($desc_tmp) > 297) {
                        $desc_str = elgg_substr($desc_tmp, 0, 297) . '...';
                } else {