_includes/figure: Replace remove:<p> with strip_html, fix #4841

This commit is contained in:
iBug
2024-05-15 00:46:41 +08:00
parent 536e89d174
commit 4efb8638c4
3 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<figure class="{{ include.class }}">
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup" title="{% if include.caption %}{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}{% endif %}">{%- endif -%}
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup"{% if include.caption %} title="{{ include.caption | markdownify | strip_html }}"{% endif %}>{%- endif -%}
<img src="{{ include.image_path | relative_url }}"
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
{%- if include.popup -%}</a>{%- endif -%}