You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ticket is understood, and QA has been contacted (if the ticket has a QA label).
This work is added to the sprint review slide deck (key win bullet point and demo slide)
Templates can have placeholders in links. For example, consider this template body:
To make a payment, please visit [this link](https://www.va.gov/((path))/.
Now consider what happens when the user supplies the personalization path=this is a path. Prior to the changes for #169, this converted to:
<p>To make a payment, please visit <a href="https://www.va.gov/this is a path/">this link</a>.</p>
That is syntactically correct HTML, and it renders as expected in an e-mail client. However, the link is invalid, and the recipient will be met with a 404 upon clicking the link.
After the changes for #169, the same input converts to:
<p>To make a payment, please visit [this link]<a href="https://www.va.gov/this">https://www.va.gov/this</a> is a path/.</p>
Visually, this is obviously wrong, but the link is broken in both cases. The root cause might be that the newer version of Mistune parses URLs slightly differently. The difference in parsing seems to be upstream of customizations made in Utils.
Steps to Reproduce
In the portal or via Postman, send yourself an e-mail message using the template "QA All The Formatting," and observe the broken links. Alternatively, just look here.
We are alerting users about this problem and asking them to ensure any customizations they insert into URLs are properly escaped. This should include the URL path and also parameters (i.e. ?v1=1&v2=2).
Impact/Urgency
This was already broken, so the impact and urgency should be low.
Expected Behavior
Spaces in URL paths and parameters are properly escaped and do not brink lines. The HTML is as expected.
The fix is probably to preprocess the input and replace spaces in URLs with proper escape characters.
QA Considerations
Exercise the edge cases
Additional Info & Resources
Relevant RFC. Spaces are permitted but should utilize % encoding.
insert action link is an example of a preprocessing function. Note how that is used in template.py.
The text was updated successfully, but these errors were encountered:
Description
Templates can have placeholders in links. For example, consider this template body:
Now consider what happens when the user supplies the personalization
path=this is a path
. Prior to the changes for #169, this converted to:That is syntactically correct HTML, and it renders as expected in an e-mail client. However, the link is invalid, and the recipient will be met with a 404 upon clicking the link.
After the changes for #169, the same input converts to:
Visually, this is obviously wrong, but the link is broken in both cases. The root cause might be that the newer version of Mistune parses URLs slightly differently. The difference in parsing seems to be upstream of customizations made in Utils.
Steps to Reproduce
We are alerting users about this problem and asking them to ensure any customizations they insert into URLs are properly escaped. This should include the URL path and also parameters (i.e. ?v1=1&v2=2).
Impact/Urgency
This was already broken, so the impact and urgency should be low.
Expected Behavior
The fix is probably to preprocess the input and replace spaces in URLs with proper escape characters.
QA Considerations
Additional Info & Resources
Relevant RFC. Spaces are permitted but should utilize % encoding.
insert action link is an example of a preprocessing function. Note how that is used in template.py.
The text was updated successfully, but these errors were encountered: