Summary:
Search Module removes valid words when indexing.
Detailed Description:
CMSMS V 1.10.3
File /modules/search/search.tools.php line 22 (function search_StemPhrase)
The line
$phrase = preg_replace('/{.*}/', '', $phrase);
is supposed to only strip smarty tags but it doesn't.
I think it should be replaced with:
$phrase = preg_replace('/{.+?}/', '', $phrase);
However, I'm no regex expert so there may be a better way.
Consider this text:
<p>Apples, bananas, carrots, <a href="{cms_selflink href="somepage"}">click
this</a> dewberry, eggs <a href="{cms_selflink href="somepage"}">click this
too</a> flowers, grapefruit</p>
The result using the current code is:
<p>Apples, bananas, carrots, <a href="">click this too</a> flowers,
grapefruit</p>
The result using the revised code is:
<p>Apples, bananas, carrots, <a href="">click this</a> dewberry, eggs <a
href="">click this too</a> flowers, grapefruit</p>
As you can see, more data is being removed than intended.