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

Markdown Support Schemes for Link option doesn't work with new parser template #27065

Closed
ankar84 opened this issue Oct 14, 2022 · 6 comments · Fixed by #27284
Closed

Markdown Support Schemes for Link option doesn't work with new parser template #27065

ankar84 opened this issue Oct 14, 2022 · 6 comments · Fixed by #27284

Comments

@ankar84
Copy link

ankar84 commented Oct 14, 2022

Description:

Markdown Support Schemes for Link option works perfect with legacy parser template, but not work with new message parser.

Steps to reproduce:

  1. Go to Admin UI - Message - Markdown Support Schemes for Link and add notes scheme protocol.
  2. Write in any chat this line [notes link](notes://Server/C3257116002CAD60/0/CCAF6BE2824A1F49432588D2001FA73E)
  3. With legacy message parser that line will parse as clickable link but with new parser it will just text.

Expected behavior:

That Markdown Support Schemes for Link option must work same with new parser as it work in legacy parser.

Actual behavior:

Admin UI - Message - Markdown
IMG_20221014_083627.jpg

But with new parser notes and e1c protocols not parse as a links
1
2

Server Setup Information:

  • Version of Rocket.Chat Server: 4.8.6
  • Operating System: Oracle Linux 8.5
  • Deployment Method: docker
  • Number of Running Instances: 20
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: v14.18.3
  • MongoDB Version: 4.4.16

Client Setup Information

  • Desktop App or Browser Version: 3.8.11
  • Operating System: Windows 10

Additional context

This is a new parser issue. And that is really critical for us.
@hugocostadev asked me to create a separate issue about that problem

Relevant logs:

@ankar84
Copy link
Author

ankar84 commented Nov 2, 2022

5.3.0 still not fixed

@hugocostadev
Copy link
Contributor

Hi @ankar84 your new parser is too permissive, you can use any protocol and domain.

I think that your problem is not because of the setting not being honored (that indeed it is not), I tested here and figure out that your issue it's because of that you are using a File Path instead of a URI inside the Link markdown [Link Label](URI_HERE)

Several settings only work with the legacy parser, we will clean up several settings to avoid confusion

But I understand your use case and we will discuss this internally if make sense to add this behavior to our message-parser.

@ankar84
Copy link
Author

ankar84 commented Nov 8, 2022

Hi @ankar84

Hey, @hugocostadev and thank you for your and team attention to that issue (really critical for us)

your new parser is too permissive, you can use any protocol and domain.

Wow! I really can use any protocol scheme?
Can you describe rules to any link of any protocol parsed correctly with new parser?
Because accounting software 1C protocol scheme e1c do not work with new message parser (we use that too, but not so critical as Lotus Notes links)
UPD Unfortunatelly looks like e1c links need a fix on Rocket.Chat side
Here is a vendor scheme
image

I think that your problem is not because of the setting not being honored (that indeed it is not), I tested here and figure out that your issue it's because of that you are using a File Path instead of a URI inside the Link markdown [Link Label](URI_HERE)

I don't know if it's true. But what I know for sure it's Notes links works perfect with legacy parser and don't work (do not render) with new modern message parser (template).
Is there a way to correct my File Path style to URI style? You mean I need some dot(.) in server name, like [notes link](notes://server1.company.com/C3257116002CAD60/0/CCAF6BE2824A1F49432588D2001FA73E) or what?
UPD Guess that is true and additional dot fixed our lotus link in new parser
image

I see this draft and this little helpful article with examples of Lotus Notes URI scheme.

Several settings only work with the legacy parser, we will clean up several settings to avoid confusion

Yes, settings should be refactored to correspond new message parser if you are plan to deprecate legacy parser in near future versions. Not working settings for deprecated legacy parser can only confused admins.

But I understand your use case and we will discuss this internally if make sense to add this behavior to our message-parser.

Thank you for attention to that problem! It is really critical for us now, Because we still on a 4.8.6 and can't upgrade to 5.3.0 because Lotus Notes links (that heavily uses almost 100% of our users and a daily basis) don't work in new parser and legacy parser works horrable even it with Lotus Notes links.

@ankar84
Copy link
Author

ankar84 commented Nov 9, 2022

Actually my problem is solved by @hugocostadev reply and my tests.
Results:

  1. Lotus Notes links should work changing local annotation Server to FQDN style like server.com
  2. 1S links will not work with new parser unfortunately because of it's proprietary protocol scheme specification (but we have https alternatives to e1s links)

@ankar84 ankar84 closed this as completed Nov 9, 2022
@hugocostadev
Copy link
Contributor

You are welcome @ankar84!

@DerFaysal
Copy link

the same thing is happening to me, with ".internal" websites. I opened an issue for it here

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.

4 participants