Skip to content

Commit

Permalink
Merge pull request #1936 from haxtibal/tdmg/nbsp_safe
Browse files Browse the repository at this point in the history
Mark more special HTML in templates as safe
  • Loading branch information
stanislaw authored Aug 16, 2024
2 parents 1b8f3cf + a624ff6 commit 49d3165
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
data-turbo="false"
>
<span class="section-number">
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;" * (section.ng_level * 2 - 1) }}
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;"|safe * (section.ng_level * 2 - 1) }}
</span>{{- section.title -}}
{# TODO #fragment #}
{# {{ section.document_is_included() }} {{ section.parent_or_including_document.reserved_title }}/{{ section.get_document().reserved_title }} #}
Expand All @@ -47,7 +47,7 @@
data-turbo="false"
>
<span class="section-number">
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;" * (section.ng_level * 2 - 1) }}
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;"|safe * (section.ng_level * 2 - 1) }}
</span>
{%- if section.reserved_title is not none -%}
{{- section.reserved_title -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="pdf-toc-row" data-nodeid="{{ item.reserved_mid }}">

<span class="pdf-toc-cell">
{{ item.context.title_number_string if item.context.title_number_string else "&nbsp;" * (item.ng_level * 2 - 1) }}
{{ item.context.title_number_string if item.context.title_number_string else "&nbsp;"|safe * (item.ng_level * 2 - 1) }}
</span>
<span dotted class="pdf-toc-cell">
<a href="#{{ view_object.render_local_anchor(item) }}" data-turbo="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{%- include "components/badge/index.jinja" -%}
{%- endwith -%}
<span>
{{ requirement.context.title_number_string if requirement.context.title_number_string else "&nbsp;" * (requirement.ng_level * 2 - 1) }}
{{ requirement.context.title_number_string if requirement.context.title_number_string else "&nbsp;"|safe * (requirement.ng_level * 2 - 1) }}
</span>
{%- if requirement.reserved_title is not none -%}
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{%- include "components/badge/index.jinja" -%}
{%- endwith -%}
<span>
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;" * (section.ng_level * 2 - 1) }}
{{ section.context.title_number_string if section.context.title_number_string else "&nbsp;"|safe * (section.ng_level * 2 - 1) }}
</span>
<span>{{ section.title }}</span>
{%- if tab == "diff" -%}
Expand Down

0 comments on commit 49d3165

Please sign in to comment.