-
-
Notifications
You must be signed in to change notification settings - Fork 197
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 parser fails in content file when using a content variable as the url #992
Comments
Do the variables need to be parsed before the markdown gets parsed? |
It used to work, so I would say yes. |
@bennothommo any thoughts? |
I assume the new Markdown parser is probably applying some escaping on the URLs for links, whereas the old Parsedown library didn't. I do feel that those variables should be parsed before Markdown however, so if that's not the case, I'll fix that. |
@bennothommo You must have had really good reasons to change the parser, but it has created quite a bit of BC... and now you're saying it can't even be extended easily because of final class/methods ? |
@mjauvin I'd argue it's only been edge cases so far. Given how prevalent it's used in the Blog and Docs plugins, it's been surprisingly smooth if I'm being honest, especially since Parsedown was very loose with its following of standards whilst CommonMark is more strict. |
Seems I've been hitting all those "edge cases" myself... ;) |
True - which means either you have very bad luck, or people are silent on the matter. But either way, I still feel it was a net positive. 😛 |
@mjauvin is this still an issue for you? |
@LukeTowers it still is, but I'm now using |
Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
The new markdown parser fails in a contend file when using a content variable in place of a static url.
Steps to replicate
Using this markup in a CMS page:
And this content file:
Workaround
Using
<a href="{url}">click here</a>
tag in the content file works.The text was updated successfully, but these errors were encountered: