SOLVED: Trying to strip.tags in searchresults
tmuth's solution works great for the index search (tiki-searchindex.php) but not for the database search (tiki-searchresults.php) — I kept hitting a String/Array error.
So, borrowing from tmuth, here's my hack:
- In tiki-searchresults.php add the following lines:
- $search1= array('__','!','!!','!!!','^','{maketoc}','%%%','::');
- $replace1= array('','','','','','','','');
- Then assign the variables to be used in the template:
- $smarty->assign('search1', $search1);
- $smarty->assign('replace1', $replace1);
- Finally, in the tiki-searchresults.tpl template file, replace:
- {$results[search].data|strip_tags}
with this:
- {$results[search].data|replace:$search1:$replace1}
I'm sure there's a more elegant solution, but this seems to work for me.
-Rick