# Message quote issue

**URL:** <https://forums.rocket.chat/t/message-quote-issue/15115>\
**Category:** Community Support\
**Created:** [October 9, 2022, 11:19pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115 "2022-10-09T23:19:50Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![spd](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@spd](https://forums.rocket.chat/u/spd)\
**Post date:** [October 9, 2022, 11:19pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/1 "2022-10-09T23:19:51Z")

</div>

There is some issue with quoting messages on my server.  
When quoting, before the message there is a visible url (I supposed to the quoted message).  
It all started after updating to version 4 of rocketchat ( dont remember what exact version)  
And only mobile clients were affected by this issue. On the web everything was OK.  
But after updating to 5.1.4 version the problem started also thru the web.

On mobile client (iOS):

 ![RocketChat_quote_issue_Mobile](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/6/6371d30c9e96802605a29f6bd36d96fe61de7b78.png)

On Web client:

 ![RocketChat_quote_issue_Web](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/d/dccb46f8a24474c5f1bda00826f5d80c5bc692d3.png)

### Server Setup Information

- Version of Rocket.Chat Server: 5.1.4
- Operating System:
- Deployment Method: docker
- Number of Running Instances: 3
- DB Replicaset Oplog: yes
- NodeJS Version: 14.19.3
- MongoDB Version: 5.0.13
- Proxy: nginx
- Firewalls involved: yes

### Any additional Information

There is no errors or anything in rocketchat server log or in chrome devtools console.  
The only thing is the error when rockerchat start about dublicated key, but I dont think that it is relevant

> Some indexes for collection ‘rocketchat\_read\_receipts’ could not be created:  
> 2022-10-08T21:18:25.863827684Z E11000 duplicate key error collection: rocketchatdb.rocketchat\_read\_receipts index: roomId\_1\_userId\_1\_messageId\_1 dup key: { roomId: “CPkfThxvdfgyj7vtzM”, userId: “prCbdhjuHT6Nv8gqG”, messageId: “zwhmVNj8srtfJYiwI” }

The issue exist in all chats on the server, direct and channels  
Any ideas where to look would be appreciated.

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [October 10, 2022, 1:40pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/2 "2022-10-10T13:40:19Z")

</div>

Hi!

Not sure how to reproduce this.

Can you test on latest 5.2.rc-4?

If you want to help us test newer version, considering joining our [Beta Testers Channel](https://open.rocket.chat/channel/beta-testers)

Thanks!

---

<div class="post-metadata">

**Author:** ![spd](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@spd](https://forums.rocket.chat/u/spd)\
**Post date:** [October 10, 2022, 5:20pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/4 "2022-10-10T17:20:45Z")

</div>

I’ve digged deeper into message how it is stored in mongo db

here is a message with quote issue:

 ![RocketChat_quote_issue_Mongo_with_issue](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/9/910e1bafc5a33c03391e14a1ea1fe904eb29ca24.png)

here is a message with no issue ( I have a test server with the same versions as production):

 ![RocketChat_quote_issue_Mongo_with_no_issue](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/0/0b7e40129f7dc538f173978945334cf6e879709b.png)

With red I marked where are the differences.  
so the issue is when writing a message, not when showing it in web or mobile client.

**ignoreParse: True**

I think this is giving all that effect, but from where it is coming from?

---

<div class="post-metadata">

**Author:** ![spd](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@spd](https://forums.rocket.chat/u/spd)\
**Post date:** [October 10, 2022, 8:53pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/5 "2022-10-10T20:53:51Z")

</div>

I guess I found the culprit.

It is a message parser.

urls where there is a minus after first letter in domain name are not recognized as urls but like plain text, i.e. urls like this:

[https://chat.e-xample.com](https://chat.e-xample.com)  
[https://chat.r-ocket.com](https://chat.r-ocket.com)

I have a domain name like these examples.

---

<div class="post-metadata">

**Author:** ![spd](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@spd](https://forums.rocket.chat/u/spd)\
**Post date:** [October 11, 2022, 11:25pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/6 "2022-10-11T23:25:52Z")

</div>

here is the example,

[https://chat.e-xample.com](https://chat.e-xample.com) is not recognized as url,  
but [https://chat.ee-xample.com](https://chat.ee-xample.com) is ok

![RocketChat_quote_issue_URL_example](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/5/5546f01e1f77b21a082fe394755dff19271a6317.png)

so I guess I need to wait at least forever while this would be fixed.

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [October 14, 2022, 6:18pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/7 "2022-10-14T18:18:55Z")

</div>

Oh, that’s a nice catch!

I can confirm. I have searched for a similar and could not find.

Would you mind going ahead and opening one?

Thanks!

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [October 17, 2022, 12:30pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/8 "2022-10-17T12:30:25Z")

</div>

Hi! Looks like this issue is related:

> <https://github.com/RocketChat/Rocket.Chat/issues/27078>
>
> \### Description:
> 
> The link https://www.n-tv.de/ is not clickable when being pa…rt of a message. However, a link preview is generated which can be clicked.
> 
> This seems to happen with all URLs that match \`\\.\[a-z\]\\-\`.
> 
> \### Steps to reproduce:
> 
> 1. Write a message containing https://www.n-tv.de/.
> 2. Desperately click on the non-clickable link.
> 
> \### Expected behavior:
> 
> The link is clickable.
> 
> \### Actual behavior:
> 
> The link is not clickable.
> 
> !\[image\](https://user-images.githubusercontent.com/404840/195988005-7ad2242c-7d4e-4e54-bfd1-68e4683ec455.png)
> 
> \### Server Setup Information:
> 
> \- Version of Rocket.Chat Server: 5.2.0
> \- Deployment Method: Docker
> \- Number of Running Instances: 1
> 
> \### Client Setup Information
> 
> Affects any desktop and mobile browser as well as the Android app.

---

<div class="post-metadata">

**Author:** ![julz22x4](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/julz22x4/32/2607_2.png) [@julz22x4](https://forums.rocket.chat/u/julz22x4)\
**Post date:** [November 3, 2022, 10:00am UTC](https://forums.rocket.chat/t/message-quote-issue/15115/9 "2022-11-03T10:00:17Z")

</div>

Hi,  
I have the same issue since 5.3.0.  
I upgraded today from 5.1.3 which was working fine.  
**I have no minus in my server url at all! just letters and numbers like ‘[https://chat.123abc.de](https://chat.123abc.de)’**

Are there any news on this?

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 7, 2022, 5:49pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/10 "2022-11-07T17:49:16Z")

</div>

Hi! We have been fixing a lot of issues regarding the message parser.

I think we need to make sure that this issue you are facing is somehow covered in one of the issues already listed in [Message Parser · GitHub](https://github.com/RocketChat/Rocket.Chat/projects/57)

If not, we should open a new issue and add it to this project.

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![julz22x4](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/julz22x4/32/2607_2.png) [@julz22x4](https://forums.rocket.chat/u/julz22x4)\
**Post date:** [November 9, 2022, 12:04pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/11 "2022-11-09T12:04:28Z")

</div>

I dont know. I cannot find something related to this!

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [November 9, 2022, 9:47pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/12 "2022-11-09T21:47:16Z")

</div>

hi!

I think you can go ahead and open an issue.

I have tested those urls:

[https://chat.e-xample.com](https://chat.e-xample.com)  
[https://chat.r-ocket.com](https://chat.r-ocket.com)

Can you please create an issue for that? So we can try having more URL issues around that.

[https://chat.123abc.de](https://chat.123abc.de)

this one will work with numbers on the begining of the domain ☹

something is off on that.

Please, let me know if you can open the issue.

Thanks!!

---

<div class="post-metadata">

**Author:** ![julz22x4](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/julz22x4/32/2607_2.png) [@julz22x4](https://forums.rocket.chat/u/julz22x4)\
**Post date:** [November 12, 2022, 12:29pm UTC](https://forums.rocket.chat/t/message-quote-issue/15115/13 "2022-11-12T12:29:03Z")

</div>

Here is the created Issue:

> <https://github.com/RocketChat/Rocket.Chat/issues/27249>
>
> \<!-- 
> 
> Please see our guide for opening issues: https://rocket.chat/docs/contr…ibuting/reporting-issues
> 
> If you have questions or are looking for help/support please see: https://rocket.chat/docs/getting-support
> 
> If you are experiencing a bug please search our issues to be sure it is not already present: https://github.com/RocketChat/Rocket.Chat/issues
> 
> \--\>
> 
> \### Description:
> 
> If i quote a message in Rocket.Chat the message above the quote has a incorrectly formated link in front of the text which was not there before
> 
> \### Steps to reproduce:
> 
> 1. quote a message (test message)
> 2. enter your answer (test quote)
> 3. send the message
> 
> \### Expected behavior:
> 
> the answer shoud be shown without that link
> 
> \### Actual behavior:
> 
> the answer has a incorrectly formatted link in front of the test
> 
> !\[Bildschirm­foto 2022-11-12 um 13 04 39\](https://user-images.githubusercontent.com/1408580/201473351-96a6ede0-4ce4-4abb-8ffa-b7ff76e7c58c.png)
> 
> \### Server Setup Information:
> 
> \- Version of Rocket.Chat Server: 5.3.0
> \- Operating System: debian 11
> \- Deployment Method: docker (linux amd64)
> \- Number of Running Instances: 1
> \- DB Replicaset Oplog: yes
> \- NodeJS Version: 14.19.3 - x64
> \- MongoDB Version: 5.0.13
> 
> \### Client Setup Information
> 
> \- Desktop App or Browser Version: Chrome 107
> \- Operating System: MacOS X 13.x
> 
> \### Additional context
> 
> Last working state was on Rocket.Chat Server Version 5.1.3
> It is maybe related to the Message Parser and has something to do with special characters in the Server URL (see discussion), but this is not the case here.
> 
> \### Community discussion:
> 
> \[https://forums.rocket.chat/t/message-quote-issue/15115/8\](https://forums.rocket.chat/t/message-quote-issue/15115/8)

---

<div class="post-metadata">

**Author:** ![julz22x4](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/julz22x4/32/2607_2.png) [@julz22x4](https://forums.rocket.chat/u/julz22x4)\
**Post date:** [November 26, 2022, 9:35am UTC](https://forums.rocket.chat/t/message-quote-issue/15115/14 "2022-11-26T09:35:01Z")

</div>

i can confirm. the issue is gone on 5.4.0-rc.0 (rc.1) !  
thanks
