Closed (fixed)
Project:
Fuzzy Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 May 2012 at 18:50 UTC
Updated:
23 Nov 2012 at 21:00 UTC
When I look at excerpt results, very often I see two or more words are joined into one. Seems this is because module do strip_tags() on text, and after this text like
<ul><li>One</li><li>Two</li><li>Three</li></ul>
becomes OneTwoThree instead of One Two Three
The problem is in function fuzzysearch_build_excerpt():
switch ($index->item_type) {
case 'node':
node_build_content($entity);
$text = strip_tags(render($entity->content));
break;
}
For solve this issue for me, I have change the string $text = strip_tags(render($entity->content)); to this
$text = preg_replace('#(<\w.*)#',' $1',render($entity->content));
$text = strip_tags($text); ?>
This is not so good solution, but works for me.
Comments
Comment #1
awolfey commentedThanks Murz. I fixed this in a cruder way, because I don't think we can predict that \w will fit everyone's use cases.