ChatSecure / ChatSecure-iOS

ChatSecure is a free and open source encrypted chat client for iOS that supports OTR and OMEMO encryption over XMPP.
https://chatsecure.org
Other
3.13k stars 1.03k forks source link

Text bubble render error on second line with special character #1081

Open salixh5 opened 5 years ago

salixh5 commented 5 years ago

Hi, I just found out when I write a message and it has multiple lines, that the second line will be blank when I include a special character, in my case I was trying to send a ❤︎.

Not sure if this is also the case for other characters or why it works fine in the first line. You can see the whole message I sent correctly on the contact/chat list, so it‘s probably only a display error.

img_1564

test

mimi89999 commented 5 years ago

@jeifour I can't reproduce this issue. All characters appear when there is a newline and when there is a line wrap. Could you please confirm that the issue has been resolved?

salixh5 commented 5 years ago

@mimi89999 Thanks for your reply. I am able to reproduce this. I have the newest version from the App Store 4.3.6 (138) on my iPhone SE with iOS 12.1.4 (16D57).

png 2 png

The second message in my screenshot really included this type of heart at the end: ❤︎ Which is visible fine on the contact screen.

Edit: Actually you see here again it's not just the heart itself that doesn't get displayed but the whole second line of the text bubble.

mimi89999 commented 5 years ago

I tried sending the same message on a simulated iPhone SE running iOS 12.1, but it appeared correctly. Here is the screenshot:

simulator screen shot - iphone se - 2019-03-03 at 18 57 01

I don't know how to debug this.

mimi89999 commented 5 years ago

OK. I managed to reproduce it. The problematic symbol isn't the heart:

The second message in my screenshot really included this type of heart at the end: ❤︎

It's the U+2764 "Heavy Black Heart" symbol.

mimi89999 commented 5 years ago

It's an issue in a library ChatSecure is using: https://github.com/jessesquires/JSQMessagesViewController/issues/1852

mimi89999 commented 5 years ago

I tested with many different characters and only that one was causing the issue.

salixh5 commented 5 years ago

Yes sorry the "emoji heart" I only used to show an example where it works. I now see that my explanation wasn't clear enough. Glad you still managed to reproduce it.

Next time I report any bug like this I will include the Unicode code point and be more specific.