-
Notifications
You must be signed in to change notification settings - Fork 935
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
Proposal: do not validate href attribute #1020
Comments
Hi @lessless Thanks for reporting, It looks like a runtime error rather than a validation issue. We'll see what we can do about this |
Had the exact same issue here. This is a limitation when trying to generate any dynamic link in the template. |
I also had the same issue, also when trying to generate a dynamic link in the template. |
Hello. |
Temporary workaround is to swap |
We're working on a fix for the parser, but it can leads to lot of issues. So let's hope we can push the fix in 4.1 release. We might need to push an "experimental" tag to let people try before ship it to the release branch. So no ETA about it yet |
Thanks for your quick responses. I'm ok if you need, to test the 4.1 release on my template before push in the release branch |
Hello @iRyusa , do you have any news about the fix ? |
Hello, do you have any update about this issue ? |
you are on 4.0 on 4.0.3 ? |
I try with There is the code generate the URIError : URI malformed |
Hi @batman774 , we changed the way we handle attributes so as to allow anything in attribute values. This will fix this issue. |
Hi @kmcb777 , thanks for your quick response. I'm waiting :) |
Hello @kmcb777 |
Asking again and again doesn't help... we're doing our best, already providing releases at a quick pace: https://github.com/mjmlio/mjml/releases. We just released a new version yesterday and have others in the pipe, you can check the milestones to see what's up: https://github.com/mjmlio/mjml/milestones. No ETA. |
Sorry for asking again. I'm sure you're doing your best |
Beta is now available on NPM with @batman774 @lessless feel free to test it and provide feedback about the fix. We need to check if we don't break anything on parser because it's really a critic point of MJML. So we'll release it when we're confident enough about the behavior |
Hello,
We are using mjml output as a template which should be populated with specific details for each recipient. Our template engine uses very common
<%= %>
notation to denote variables that should be populated later on. Also we want to usestrict
validation mode to know if something went wrong and our system produced invalid mjml but it seems to not be possible in v4.Update: actually using
<%= %>
in the href attribute will cause a failure in any validation level, not only instrict
Reproduction Steps:
<mj-image href="<%= dynamic_content %>"></mj-image>
https://mjml.io/try-it-live/r1JMP9jdG<mj-button href="<%= dynamic_content %>">Promotion</mj-button>
https://mjml.io/try-it-live/rkhwu5sdGExpected behavior:
MJML should be valid
Observed behavior:
{"message":"URI malformed"}
error is givenMJML version:
v 4.0
The text was updated successfully, but these errors were encountered: