Repository navigation
[Fix]: Calendar links breaking status - #3376
Merged
Merged
Conversation
jlucytan
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Asana Ticket: Investigate calendar links breaking status
Implementation
One of our alerts has a URL in the description that ends a line. Our text->HTML conversion functions were not properly separating the URL from the \r\n that came after it. Basically we split up everything by spaces and then parse each "token" to see if it's a URL. Without a space after the URL (spaces before newlines were stripped and replaced with a
<br/>) the URL detector got something likehttp://example.com/path<brand that caused all sorts of havok.This theory is proven by putting a space and a non-whitespace character after the URL in the alert. This forces the missing space before the newline to come and fixes the rest of the text->HTML flow
To fix this I tweaked our newline replacement rules to include a whitespace before the newline so that our "tokenizer" can actually separate the URL out.
Screenshots
Dev-green
Local
Note: Be sure to disable "Hide Whitespace" on github, this PR is nothing but whitespace.
How to test
Point local at dev green
http://localhost:4001/
http://localhost:4001/alerts/subway
http://localhost:4001/schedules/Green-C/line
Confirm that alert #1003815 renders properly, and that the link works as expected.