sendingtk / chatwoot

Other
89 stars 78 forks source link

Chatwoot is changing symbols in URLs in received messages #84

Open laianeramos opened 1 month ago

laianeramos commented 1 month ago

Describe the bug

When receiving an URL on Chatwoot, it changes the _ to *

For example: https://blabla.com/doc/bla_bla_bla image

It changes it to: https://blabla.com/doc/bla*bla*bla image

And, consequently, the URL does not open

What I noticed is that on WhatsApp, to make a word italic we put it between underscores like this On Chatwoot, for italics we use 1 asterisk: like this and for bold we use 2 : like this * (without spaces)

So, I think Chatwoot is making this change to match the format initially sent, but it is a URL and not a text, so it messes up the URL.

When sending a URL through Chatwoot, it is sent normally. No changes are made. The bug only occurs when the message is received in Chatwoot image image

To Reproduce

  1. Send a URL containing a snippet between underscores, like this: https://blabla.com/doc/bla_bla_bla
  2. Open the message in Chatwoot
  3. It will be received like this: https://blabla.com/doc/bla*bla*bla
  4. Send the same URL (https://blabla.com/doc/bla_bla_bla) through Chatwoot to a contact;
  5. It will be sent and received correctly (like this: https://blabla.com/doc/bla_bla_bla)

Expected behavior

The URL be received exactly as it was sent

Environment

Docker

Cloud Provider

Other [please specify in the description]

Platform

Browser

Operating system

Ubuntu 20.04

Browser and version

Chatwoot 3.10.3

Docker (if applicable)

No response

Additional context

No response

laianeramos commented 1 month ago

When sending the url with 1 * chatwoot changes to **:

How I sent: image

How it was received on chatwoot: image

I think this may confirm that chatwoot is making this change to match the formatting initially sent, which would be fine if it was plain text and not a URL