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.
Comments
Comment #1
jpmckinney commentedAdd tag
Comment #2
pwolanin commentedComment #3
jpmckinney commentedMay as well avoid a PHP notice like in D7.
Comment #4
jpmckinney commentedI can't review my own patch. We want this for 6.x-1.3.
Comment #5
pwolanin commentedLooks good to me - it's simple code.
Comment #6
jpmckinney commentedFixed 6.1 and 6.2.