Mercurial > libervia-templates
comparison sat_templates/templates/bulma/chat/message.html @ 363:cddac8502c4b
chat/message: fix urlize escaping on nunjucks:
Nunjucks imply to use `safe` when using `urlize`, while Jinja2 doesn't. Esacaping and safe
filter are added so that `urlize` can work with both engines.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jun 2023 10:40:53 +0200 |
parents | b2b859a62e70 |
children | 095bd5b34080 |
comparison
equal
deleted
inserted
replaced
362:b2b859a62e70 | 363:cddac8502c4b |
---|---|
35 </div> | 35 </div> |
36 </div> | 36 </div> |
37 </nav> | 37 </nav> |
38 {% endif -%} | 38 {% endif -%} |
39 <p class="msg_body has-whitespace-pre-wrap" id="msg_body_{{msg.id}}" style="margin: 0;"> | 39 <p class="msg_body has-whitespace-pre-wrap" id="msg_body_{{msg.id}}" style="margin: 0;"> |
40 {{- msg.html or (msg.text|urlize) -}} | 40 {{- msg.html or (msg.text|e|urlize|safe) -}} |
41 </p> | 41 </p> |
42 <div id="actions_{{msg.id}}" class="level is-mobile actions mb-0"> | 42 <div id="actions_{{msg.id}}" class="level is-mobile actions mb-0"> |
43 <div class="level-right"> | 43 <div class="level-right"> |
44 {#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} | 44 {#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} |
45 {{ icon('dot-3', cls='icon is-small action-button', id='msg_actions_{{msg.id}}') }} | 45 {{ icon('dot-3', cls='icon is-small action-button', id='msg_actions_{{msg.id}}') }} |