-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix comments search result to work with multibyte strings #18302
Conversation
Currently, the searching in comments breaks up, if comments contain multibyte characters and string manipulation logic in getRelevantMessagePart happens to cut through them rendering the resulting string invalid (not UTF-8 compliant). This patch replaces all string manipulating functions in this code to multibyte aware ones. Signed-off-by: Michał Węgrzynek <michal.wegrzynek@malloc.com.pl>
Thanks 👍 Do you have some sample texts to test with? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change makes sense.
@blizzz please have a look :)
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
/backport to stable17 |
/backport to stable16 |
backport to stable17 in #18399 |
backport to stable16 in #18400 |
Currently, the searching in comments breaks up, if comments contain multibyte characters and string manipulation logic in getRelevantMessagePart happens to cut through them rendering the resulting string invalid (not UTF-8 compliant). This patch replaces all string manipulating functions in this code to multibyte aware ones.
Signed-off-by: Michał Węgrzynek michal.wegrzynek@malloc.com.pl