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

Richtext component <> Link #21

Closed
mickbut-ler opened this issue Dec 23, 2024 · 2 comments
Closed

Richtext component <> Link #21

mickbut-ler opened this issue Dec 23, 2024 · 2 comments

Comments

@mickbut-ler
Copy link

mickbut-ler commented Dec 23, 2024

What are the limitations for links within a RichText component in terms of the query parameters?

I encountered an issue when using links in a RichText component. For example:
• The following link works perfectly: [Whatsapp Flows are awesome](http://example.com/test?foo=bar)
• However, if I include multiple query parameters, like this: [Whatsapp Flows are awesome](http://example.com/test?foo=bar&test=me)

I receive the error:
Content cannot be parsed. Please check the 'text' property of RichText and validate that you are using the correct syntax.

This suggests that there might be a restriction on the use of multiple query parameters in the URL.

Can you confirm:
1. Is there a known restriction for URLs in RichText components?
2. Is the inability to handle multiple query parameters intended behavior? If so, what is the reason for this limitation?

@mickbut-ler
Copy link
Author

@lacogubik any updates?

@vasudha-mathur
Copy link

The issue lies in the Markdown syntax used to create links. The ampersand & has a special meaning in Markdown. It's used to separate multiple URLs or references. When Markdown encounters an ampersand in a URL, it tries to interpret it as a separator, which breaks the link.

To fix this issue, you can use URL encoding to encode the ampersand character. Replacing & with %26 fixes the issue:
"link"

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

No branches or pull requests

2 participants