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

Fix comments search result to work with multibyte strings #18302

Merged
merged 1 commit into from
Dec 13, 2019

Conversation

mwegrzynek
Copy link
Contributor

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

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>
@kesselb
Copy link
Contributor

kesselb commented Dec 9, 2019

Thanks 👍

Do you have some sample texts to test with?

@kesselb kesselb added 3. to review Waiting for reviews bug labels Dec 9, 2019
@kesselb kesselb added this to the Nextcloud 18 milestone Dec 9, 2019
This was referenced Dec 11, 2019
Copy link
Member

@ChristophWurst ChristophWurst left a 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 :)

@blizzz blizzz merged commit 9cafc50 into nextcloud:master Dec 13, 2019
@welcome
Copy link

welcome bot commented Dec 13, 2019

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
Most developers hang out on IRC. So join #nextcloud-dev on Freenode for a chat!

@blizzz
Copy link
Member

blizzz commented Dec 13, 2019

/backport to stable17

@blizzz
Copy link
Member

blizzz commented Dec 13, 2019

/backport to stable16

@backportbot-nextcloud
Copy link

backport to stable17 in #18399

@backportbot-nextcloud
Copy link

backport to stable16 in #18400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants