I've introduced to colleagues of using the Search feature to get in-scope classes which it's quite convenient.
However, today, I found one issue when I have some special characters in the Searching string, the special character is removed during search querying, hence the expected result is not coming. Below are some sample:
Want to search "Credit & Risk", it returns result for "Credit Risk", the "&" is ignored.
Want to search "Credit ? Risk", it returns result for "Credit Risk" as well, the "?" is ignored.
Want to search "(Special Treatment)", it returns result for "Special Treatment", both "(" and ")" are ignored.
Checking file "common/core_search_results.xsl", I found two lines may relevant:
Code: Select all
LINE 34: <xsl:variable name="currentSearch" select="replace(replace($SearchQuery, '[^\c]', ' '), ':', '')"/>
LINE 37: <xsl:variable name="matchingInstances" select="$allValues[matches(., $currentSearch, 'i')]/../.."/>
May I get your help to know how I can include certain special charaters in the searching? For "&", we use this quite often in element names.
Thanks greatly,
Xiaoqi