You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function sanitiseClassName($className, $replaceWith = '\\\\')
{
return str_replace('\\', $replaceWith, $className);
}
Update this to detect if there's any double escaping about to happen i.e. strpos($str, '\\\\') !== false , to prevent break existing sites that are adding ->sanitiseClassName in their custom code e.g. #247 (comment)
Then just add $this->sanitiseClassName() to getRequireFiltersComponent()
silverstripe-fulltextsearch/src/Solr/SolrIndex.php
Lines 1044 to 1047 in 6c59fcf
Filters added to a search query are not sanitised
Exclusions added to a search query are sanitised
This is confusing and not a good experience, as a developer must escape some classnames and no others when consuming the API to perform a search.
The text was updated successfully, but these errors were encountered: