Skip to content

Commit

Permalink
Prevent jinja2 from autoescaping markup in metadata
Browse files Browse the repository at this point in the history
Connected to webrecorder#727
  • Loading branch information
tw4l committed Aug 3, 2022
1 parent 32e9020 commit dc0c02e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pywb/templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ <h4 class="display-4">
<div class="col-12">
<label for="search-url" class="lead" aria-label="Search For Col">
{% set coll_title = metadata.title if metadata and metadata.title else coll %}
{% trans %}Search the {{ coll_title }} collection by url:{% endtrans %}
{% autoescape false %}
{% trans %}Search the {{ coll_title }} collection by url: {% endtrans %}
{% endautoescape %}
</label>
<input aria-label="url" aria-required="true" class="form-control form-control-lg" id="search-url"
name="search" placeholder="{{ _('Enter a URL to search for') }}"
Expand Down Expand Up @@ -170,7 +172,7 @@ <h4 class="display-4">
id="collection-metadata-{{ key }}" role="tabpanel">
<div class="card inherit-height">
<div class="card-body">
{{ val }}
{{ val | safe }}
</div>
</div>
</div>
Expand Down

0 comments on commit dc0c02e

Please sign in to comment.