#5038 (Links in email notifications are escaped)
31 · by Luc Saffre · in Developers · assigned to Sharif Mehedi
Résumé
Concepts sous-jacents
- #5039 (Comment with a <base> tag caused Jane to break) (by Luc Saffre in Developers assigned to Luc Saffre)
- #5368 (Replace refresh_delayed_value by something else) (by Luc Saffre in Developers assigned to Luc Saffre)
Commentaires
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : I spawned this into a new ticket #5368
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : Aha, thanks! I did not have the idea to search for "refresh_delayed_value" also in *.tsx files.
- 2 ans, 9 mois ago by Sharif Mehedi about #5038 (Links in email notifications are escaped) : [url gitlab.com/lino-framework/react/-/blob/a95b6664b267bf8c29c9136484d95379cf1c97f8/lino_react/react/components/ActionHandler.tsx#L416 Here]'s the codeblock that refreshes the delayed values
- 2 ans, 9 mois ago by Sharif Mehedi about #5038 (Links in email notifications are escaped) : There's a reference stored in the URLContext when a detail is loaded. the name for the reference is `${packId}.${actorId}`. On a response the value for the refresh_delayed_value can be either `True` or a string taking the form `${packId}.${actorId}`. When it's True, the frontend refreshes all the sl...
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : @8lurry please explain how refresh_delayed_value works. I see that it works well, but didn't find out *how* it works.
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : The reason was very simple: the CommentField did not pass the renderer when creating a child request. I spent quite some time trying to make CommentField.set_value_in_object() more "elegant" and "kosher".
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : This comment is written using the (+) button in the Comments slave panel.
- 2 ans, 9 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : This comment is written in the "My comment" field.
- 3 ans, 2 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : A side effect of this ticket is that I removed get_change_info() (because I believe that it's not used).
- 3 ans, 2 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : Only failure in book test suite is #5101 and I guess that it is unrelated to my changes.
- 3 ans, 2 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : Uff! I found the explanation and I think I fixed the issue. Also wrote a doctest page for testing it.
- 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : I took the ticket because I can test it easily by patching the source code on Jane.
- 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : Indeed links *should* work because the server_uri is given as the base href of the email in the html header: <html><_head_><_base_ href="https://jane.mylino.net" target="_blank"></head><body>
The problem is because the <a> tag of the links is escaped already in the message's body. To verify this, I ... - 3 ans, 3 mois ago by Sharif Mehedi about #5038 (Links in email notifications are escaped) : @luc , I sent you an email regarding this.
- 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : I verified: it is set on Jane:
server_url = "https://jane.mylino.net" - 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : The link in the notification seems to ignore Site.server_url setting. Or maybe this is not set on Jane?
- 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : The email says for example: Sharif Mehedi modified <a href="/#/api/tickets/MyTicketsToWork/4713">#4713 (Use Jane for chatting (using notify))</a>:
- 3 ans, 3 mois ago by Luc Saffre about #5038 (Links in email notifications are escaped) : Created new Ticket #5038 (Links in email notifications are broken).