Skip to content

Commit

Permalink
Escape doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed Feb 9, 2024
1 parent 8e3c9a7 commit f7097a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tiptapy/templates/extras/document.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{%- set caption = node.attrs.caption|trim -%}
{%- set src = node.attrs.src|trim -%}
{%- set size = node.attrs.size|trim -%}
{%- set fname = node.attrs.name|trim -%}
{%- set ext = node.attrs.format -%}
{%- set caption = node.attrs.caption|trim|escape -%}
{%- set src = node.attrs.src|trim|escape -%}
{%- set size = node.attrs.size|trim|escape -%}
{%- set fname = node.attrs.name|trim|escape -%}
{%- set ext = node.attrs.format|trim|escape -%}
{%- if src and size and fname and ext -%}
{%- set doc_block = get_doc_block(ext, fname, size, src) -%}
<figure class="file-attachment">
{%- if caption -%}
{{doc_block}}<figcaption>{{caption|escape}}</figcaption>
{{doc_block}}<figcaption>{{caption}}</figcaption>
{%- else -%}
{{doc_block}}
{%- endif -%}
Expand Down

0 comments on commit f7097a2

Please sign in to comment.