add get_text
template filter
returns object's `content` or `name`, the first is set, or an empty string. some objects don't have `content`, don't let templates rely on it
This commit is contained in:
parent
a71bf46af5
commit
1f2a8f6da7
3 changed files with 12 additions and 4 deletions
|
@ -198,7 +198,7 @@
|
|||
|
||||
|
||||
{% else %}
|
||||
{{ obj.content | update_inline_imgs | clean | replace_custom_emojis(obj) | code_highlight | safe }}
|
||||
{{ obj | get_text | update_inline_imgs | clean | replace_custom_emojis(obj) | code_highlight | safe }}
|
||||
{% endif %}
|
||||
|
||||
{% if obj | has_place %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue