While testing the D7 port, I noticed that (for example) comment titles (in h2 tags) were getting their enclosing <a href=... indexed. Since various tags we index can be nested, probably the easiest thing to do is reuse our clenaup function on each value like this:

@@ -304,7 +303,7 @@ function apachesolr_add_tags_to_document(&$document, $text) {
       if (!isset($document->{$tags_to_index[$tag]})){
         $document->{$tags_to_index[$tag]} = '';
       }
-      $document->{$tags_to_index[$tag]} .= ' '. $matches[2][$key];
+      $document->{$tags_to_index[$tag]} .= ' '. apachesolr_clean_text($matches[2][$key]);
     }
   }
 }

this change is already being incorporated into the D7 version.

CommentFileSizeAuthor
#3 882638-3.patch1.01 KBjpmckinney
#2 882638-clean-tags-2.patch1.13 KBpwolanin

Comments

jpmckinney’s picture

Issue tags: +D6

Add tag

pwolanin’s picture

StatusFileSize
new1.13 KB
jpmckinney’s picture

StatusFileSize
new1.01 KB

May as well avoid a PHP notice like in D7.

jpmckinney’s picture

I can't review my own patch. We want this for 6.x-1.3.

pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me - it's simple code.

jpmckinney’s picture

Status: Reviewed & tested by the community » Fixed

Fixed 6.1 and 6.2.

Status: Fixed » Closed (fixed)
Issue tags: -D6

Automatically closed -- issue fixed for 2 weeks with no activity.