Search text with special characters in kirby editor paragraph

I’m having trouble searching keywords with special characters in content files. I’m using the kirby editor and the text is stored in json format.

ä becomes \u00e4 and so on …

The problem is when I use the kirby function search with the keyword “qualität” for example, I’m getting no results.

Thanks for your help.

Hmm, indeed. I’ld create an issue for it: https://github.com/getkirby/editor/issues

I got a hacky solution here, this works for the moment:

$query = get('q');
$encoded_query = trim(json_encode($query), '"');
$results = $site->search($encoded_query, 'title|text');

Any other suggestions?

Don’t know if will solve your issue: https://github.com/distantnative/search-for-kirby

Note: Needs a modified Kirby version before the release of 3.4

I think your hack will work for all content that lives in editor fields, but not for content outside it (e.g. in regular textarea or text fields).