-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Support for Markdown escaping #8989
Support for Markdown escaping #8989
Comments
The last issue I mentied, the fact that RocketChat replaces text in backslashed braces with random password-like strings, also occurs in code blocks: ``` is displayed by RocketChat like this:
instead of like this:
|
An example of this not rendering properly for escaped braces is here: https://open.rocket.chat/channel/support?msg=qQmNsdpvnqWAtSurC I would suggest this is a bug, as there is no work around, and not an improvement request. |
Regarding brackets within a Markdown URL definition, e.g.: The above URL should become: |
I haven't figured out a workaround for KaTeX escaping the dollar sign for symbolic math as in below:
|
Same issue when needing to talk about *.xml & *.xsd files in a chat the rendering brings ".xml &" as bold, please provide a solution ! |
Something like *text* seems not possible. Here on github I can escape with |
Basic escaping would be awesome for all the formatting characters `*~_ |
I also would appreciate if basic escaping would be integrated. |
1 similar comment
I also would appreciate if basic escaping would be integrated. |
I also would appreciate....... Wait isn't such a feature obvious in 2020 ? Some devs I swear... |
We have a special issue with this. We use Rocket.chat in a german community that uses asterisks in their day-to-day communication ("gendern"). As you can imagine, this is very annoying. |
It appears as if it all boils down to a single line doing unconditional replacing in a string:
|
There is no escaping of special characters in RocketChat? |
Has this issue seriously been unsolved for more than 3 years now? WHAT KIND OF DEVELOPER would even introduce a formatting feature via special characters and not implement a way to escape them in the first place?? And how is the leading open source chat solution incapable of fixing such a simple problem? |
You must be new around here, I opened #8332 in 2017, and it's gone to the usual graveyard. RC has historically suffered from a lack of GitHub Issue hygiene. Often someone will come along, set some tags and milestones, then... In fact, I still have seven open issues, opened between 2016 and 2018. I used to try to explain to the team why it is critical for the health of the project, but it's their project and it's not in their culture / DNA, it's code code code (which is fine but ~2300 open issues?!?!). Having said that, RC is open source, you're presumably not paying for an Enterprise subscription, so you presumably know what sort of warranty you get. I'm sure your capable, better-developer patches are more than welcome. |
@antgel |
I fully support of the urgency of the topic. As others pointed out, the asterisk has become a de-facto standard in the German language within many corporate and governmental contexts. Following this issue, I also fully support keeping any communication within issues technical and professional. |
Completely understandable, given the 528 currently open PRs. I guess that's partly why there are ~6800(!) forks. Sigh. |
Hey guys, sorry for the late reply. What can I say? We are fully aware of markdown issues. I know it's not a good reason for this delay, but the decisions we made and how we implemented our interpreter were terrible, and in a way it became almost impossible to maintain. So we introduced marked as a second option (it was another bad decision as we now have 2 different behaviors and 2 codes to look after). To solve this, we start a new parser (we're going to remove the other two and not have 3) . You can check it here: https://github.com/RocketChat/Rocket.Chat.Fuselage/tree/develop/packages/message-parser The way this parser was built is based on a grammar, the expressiveness is much more powerful, so we are fully capable of making the changes you are asking us to make. The parser already works in the new versions but it is in beta, it doesn't provide ALL the desirable ones yet, but we are very proud with the results. And we intend to give full maintenance to this library. |
@ggazzo Thanks for the reply and the transparency. Any clues when we might see this in releases? More generally, if the team would clean up the issues and pull requests and devote x% of the time to keeping them clean, I think there would be less frustration and users would feel more empowered instead of disenchanted. It's like technical debt, if you don't pay it back, you grind to a halt. From Agile Principles:
|
@antgel It's planned to be released after version 3.19. You can already enable new parser now in Admin accounts settings. But don't be too excited, it has so many bugs that I have disabled it right away. Most of our integrations and bot messages that we built look broken or ugly with it. So it's another thing that will take 1-2 years to make work properly. |
Will you accept PRs that allow escaping and updates the current code base, i.e. one that is not related to the new parser? |
@zdumitru could you provide some examples of broken integrations? thanks again for the patience and dont give up.
@antgel you are 100% right, we're setting some goals and it's a little tricky to fit the technical debt when we want a bunch of new features "what's working is working" (with some bugs, but ok). But I swear I am extremely in agreement with your position and certainly one of my personal goals is to reduce our technical debt (sometimes I lack more time, but I never forget). Thank you for your constructive attitude and for anyone else who provides information and shows interest in helping ❤️ |
TL;DR: RocketChat fixed this in 4.0.0 (see the "new message parser" improvement, which closes this issue). To fix it you not only need to upgrade, but also change the message Parser from "General" to "Marked". After we did both of these markdown escaping works fine. |
Description:
Most Markdown engines support escaping; that is, you can tell them to ignore Markdown formatting by putting a backslash before Markdown characters. For example in Github Flavoured Markdown: https://github.github.com/gfm/#backslash-escapes
This seems to be missing in the Rocket.Chat Markdown engine. It would be especially useful for web integrations that post messages in Rocket.Chat. For example, we have written an integration that automatically posts Redmine links when someone mentions an issue ID like
#1234
; the integrations formats these links with Markdown, e.g.:Without quoting, special characters in the subject like
]
prevent Rocket.Chat from properly rendering the link.Server Setup Information:
Steps to Reproduce:
Attempt to post special Markdown characters that are escaped with a backslash. For example, try to post a text containing asterisks, and prepend a backslash to prevent Rocket.Chat from interpreting this as "bold":
Or try to post links that contains a verbatim
]
character:Expected behavior:
Rocket.Chat should display the first message like this (that is, verbatim asterisk, followed by test, followed by verbatim asterisk):
*test*
The links should be displayed like this:
Project - Error RocketChat/feature-requests#783: Subject ]
Project - Error RocketChat/feature-requests#783: Subject [test]
Actual behavior:
Rocket.Chat displays the first message like this:
\*test\*
And the links like this:
[Project - Error RocketChat/feature-requests#783: Subject \]](https://redmine.example.com/issues/1234)
Project - Error RocketChat/feature-requests#783: Subject =!=IfJbf9a34tKf2QEcg=!=
I don't even have the slightest idea what's happening with the second link, Rocket.Chat seems to replace the text in braces with a random string?! It kinda looks like a password, so I've replaced it with a randomly generated similar string just to be sure.
The text was updated successfully, but these errors were encountered: