Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Markdown link which url has `&` has broken

Open peccu opened this issue 9 years ago • 16 comments

Rocket.Chat Version: 0.54.2 Running Instances: 1 DB Replicaset OpLog: Enables Node Version: v4.7.1

Markdown link which url has & has broken.

ex: [url with & has broken](https://demo.rocket.chat/channel/general?test=test&test2=test2) becomes a link to https://demo.rocket.chat/channel/general?test=test&test2=test2 ( & is replaced to & )

I think this is because of 590d120ff16c388a57ad0d78c07e096debca3df7. So I'll try to fix and create PR.

peccu avatar Apr 19 '17 01:04 peccu

Is this live already? I think I've reproduced it in the demo chat today.

Steps to reproduce: Copy and paste this into a rocket chat window:

this is a [mangled link](http://example.com/?q=foo&r=bar)

Expected result: (output html) <a href="http://example.com/?q=foo&r=bar">mangled link</a>

Let me know if you need more info.

thiagoarrais avatar Sep 28 '17 13:09 thiagoarrais

@rocket-cat close

Closibg this, as I cannot reproduce this on latest stable version (0.62.2). Please get back to me with additional details if you think this is still the case and I'll happily reopen :)

Cheers Thomas

TwizzyDizzy avatar Mar 21 '18 23:03 TwizzyDizzy

@TwizzyDizzy: I'm able to reproduce it with 0.63.1 (ac16e938693aa04740758f180f2ea6d7a0337280) - maybe be a regression?

nbuchwitz avatar Apr 09 '18 17:04 nbuchwitz

@rocket-cat open

Just reproduced on 0.63.1. Reopening.

Cheers Thomas

TwizzyDizzy avatar Apr 09 '18 17:04 TwizzyDizzy

Unfortunately, it is the same problem on 0.65.1

datafukuro avatar Jun 13 '18 21:06 datafukuro

@rodrigok @sampaiodiego Any update? #7454 and #8318 seem to be related to this.

tassoevan avatar Jun 14 '18 18:06 tassoevan

@tassoevan can you please test https://github.com/RocketChat/Rocket.Chat/pull/8318/ to make sure it properly fixes this issue?

sampaiodiego avatar Jun 15 '18 20:06 sampaiodiego

As @kaiiiiiiiii said there, it isn't the same issue though it has the same root cause. While working on #11165, I noticed that the current markdown parser need some profound tweaks to render messages reliably. I'll look for suggestions from the community and report to the @RocketChat/frontend team.

tassoevan avatar Jun 16 '18 21:06 tassoevan

issue still present in 0.69.1 ... very annoying since icinga2 also generates this type of URL's with & in between, so alert url in rocketchat are broken :(

ghosty-be avatar Sep 03 '18 10:09 ghosty-be

Issue is sadly still present..

josh0412 avatar Sep 18 '18 09:09 josh0412

I have same problem using api to sen messages - every url been sent to rocketchat have ampersant ( & ) is broken - message is cut just after first occurance of &

starso avatar Jun 27 '19 07:06 starso

Which markdown parser (Administration > Message > Markdown > Markdown Parser) is causing this?

tassoevan avatar Oct 21 '19 20:10 tassoevan

Which markdown parser (Administration > Message > Markdown > Markdown Parser) is causing this?

Original one

starso avatar Oct 22 '19 07:10 starso

@starso is this only happening when using the API?

MartinSchoeler avatar Nov 12 '19 19:11 MartinSchoeler

@starso is this only happening when using the API?

Yes, If i post message directly with url containing & mark everything is fine. Using API string gets cut after first occurence of & mark.

starso avatar Nov 13 '19 08:11 starso

I've just tested using the API and it seems to be working fine in version 2.3.0-develop please try to use the latest version, and if the problem persists, please open a new issue with updated details and the specific API call that you are using. Thanks!

MartinSchoeler avatar Nov 18 '19 14:11 MartinSchoeler