Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link parsing, character encoding, and variable accessing errors when parsing complex room topics #6895

Closed
JakeSteam opened this issue May 5, 2017 · 3 comments · Fixed by #16481

Comments

@JakeSteam
Copy link

JakeSteam commented May 5, 2017

Rocket.Chat Version: 0.54.2

Setting the room topic to _[I'm $&](http://google.com)_ should produce underlined text "I'm $&" that links to Google.

Instead, it results in this mess in chat: __blank">I'm __room_topic__amp;_, and a slightly different one in the sidebar: https://i.imgur.com/dMa4O2Z.png

  1. Underlining breaks the link parser, getting confused with the _blank target. Bad parameter escaping?
  2. The apostrophe character is incorrectly encoded (applies to other characters too).
  3. The $& sequence becomes __room_topic__amp;, indicating I'm getting some kind of access to internal variables, which I shouldn't be.

There's almostly certainly a lot more issues here.

@JakeSteam JakeSteam changed the title Link & character errors when parsing complex room topics Link parsing & character encoding errors when parsing complex room topics May 5, 2017
@JakeSteam JakeSteam changed the title Link parsing & character encoding errors when parsing complex room topics Link parsing, character encoding, and variable accessing errors when parsing complex room topics May 5, 2017
@iangilfillan
Copy link

Confirming this is still an issue in 0.62.2

@ggazzo ggazzo added this to the 0.67.0 milestone Jun 26, 2018
@theorenck theorenck modified the milestones: 0.67.0, 0.68.0 Jul 20, 2018
@theorenck theorenck modified the milestones: 0.68.0, Short-term Jul 31, 2018
@iTob191
Copy link

iTob191 commented Dec 4, 2018

Seems like this applies not only to room titles but to links in general. For example posting [a'b](https://hostname.tld) into the chat results in a link named a'b. Looks like the link text is encoded twice.

@gabriellsh
Copy link
Member

Still happens 2.5.0-develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants