There is a certain text that, if appears on a text message and that message is touched by the user, causes the phone to freeze. The text is formed by many alternating right to left and left to right unicode marks and some spaces. If the message is not touched, the phone works as usual. I have tested this on Telegram and WhatsApp. I have not tested this with an iOS device. It has no effect on my computer.
Why does this text freezes the phone, but only when touched?
Is there any way to prevent this as a user?
NOTE: I have purposely omitted the exact message to avoid directly or indirectly cause trouble to mobile users.