Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove invisible Unicode special characters from search keywords #16483

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Jan 22, 2025

Description

The change made in 9a859d9 (for #16430) is a bit too aggressive and breaks the search for multibyte character languages (e.g. Japanese). The search keywords are not stored in the database as expected (e.g. setting the entry title to 山田 will result in an empty keyword being stored).

Instead of going all in with the removal of Unicode special chars, I used the same approach we’re using for sanitising filenames, which removes the invisible unicode chars (like soft hyphen, no break, zero width space, etc).

Related issues

#16430
#16457

@i-just i-just requested a review from brandonkelly January 22, 2025 11:41
@brandonkelly brandonkelly force-pushed the bugfix/16457-unicode-special-chars-and-search branch from d438dea to 0b1283c Compare January 22, 2025 18:07
@brandonkelly brandonkelly merged commit 76b8643 into 4.x Jan 22, 2025
@brandonkelly brandonkelly deleted the bugfix/16457-unicode-special-chars-and-search branch January 22, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants