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
I have noticed that the search indexation is not working correctly when the search query includes words with single quotes or apostrophes, such as "l'orange" or "l'espace" in French. These words should be indexed as "orange" and "espace", but they are being indexed as "lorange" and "lespace" instead.
An easy fix would be to give the the possibility to define a custom $asciiPunctuation variable to allow for better handling of these types of characters in search queries. This would greatly improve the usability of the search feature for users who speak languages that make use of single quotes or apostrophes.
Steps to reproduce
Create an entry with this sentence Bienvenue de l'espace
Expected behavior
Keywords in the database should be bienvenue dans espace
Actual behavior
Keywords in the database are bienvenue dans lespace
Craft CMS version
4.x
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
What happened?
Description
I have noticed that the search indexation is not working correctly when the search query includes words with single quotes or apostrophes, such as "l'orange" or "l'espace" in French. These words should be indexed as "orange" and "espace", but they are being indexed as "lorange" and "lespace" instead.
Upon investigation, I believe the issue may be related to this line of code: https://github.com/craftcms/cms/blob/develop/src/helpers/Search.php#L87.
An easy fix would be to give the the possibility to define a custom $asciiPunctuation variable to allow for better handling of these types of characters in search queries. This would greatly improve the usability of the search feature for users who speak languages that make use of single quotes or apostrophes.
Steps to reproduce
Bienvenue de l'espace
Expected behavior
Keywords in the database should be
bienvenue dans espace
Actual behavior
Keywords in the database are
bienvenue dans lespace
Craft CMS version
4.x
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: