fix(Views): escape syntax improvement

This commit is contained in:
Matthieu Bessat 2020-08-11 12:11:43 +02:00
parent 3cc1ca5c8e
commit e76c382732
2 changed files with 36 additions and 36 deletions

View file

@ -55,13 +55,13 @@
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {{ tag.icon.width }} {{ tag.icon.height }}">
<path
fill="currentColor"
d="{{ tag.icon.path|escape('html') }}"
d="{{ tag.icon.path|e }}"
></path>
</svg>
</div>
<div class="nav-item-content">
<div class="nav-title">
{{ tag.name|escape('html') }}
{{ tag.name|e }}
</div>
<div class="nav-access">
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">

View file

@ -5,9 +5,9 @@
<meta name="description" content="{{ data.descriptionShort|e }}">
{#<meta name="keywords" content="Gaillon,association,">#}
<meta property="og:title" content="{{ data.name|e('html') }}">
<meta property="og:description" content="{{ data.descriptionShort|e('html') }}">
<meta property="og:image" content="{{ data.thumbnail.location('html') }}">
<meta property="og:title" content="{{ data.name|e }}">
<meta property="og:description" content="{{ data.descriptionShort|e }}">
<meta property="og:image" content="{{ data.thumbnail.location }}">
{% endblock %}
{% block content %}
<div class="header">
@ -33,7 +33,7 @@
</div>
<div class="cover-title-container">
<h1 class="cover-title">
{{ data.name|escape('html') }}
{{ data.name|e }}
</h1>
{# <h4 class="cover-sub-title">
Sous titre
@ -93,7 +93,7 @@
</button>
</div>
{% else %}
{{ data.descriptionShort|escape('html') }}
{{ data.descriptionShort|e }}
{% endif %}
</div>
</section>
@ -111,7 +111,7 @@
<div class="schedule-category">
<div class="schedule-category-header" title="Déroulez">
<div class="schedule-category-name">
{{ item.name|escape('html') }} {% if item.description is not empty %}<span class="separator">-</span> {{ item.description|escape('html') }}{% endif %}
{{ item.name|e }} {% if item.description is not empty %}<span class="separator">-</span> {{ item.description|e }}{% endif %}
</div>
<svg class="schedule-category-collapse-icon"
aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
@ -133,12 +133,12 @@
{% for when in item.when %}
<div class="schedule-category-day-container">
<div class="schedule-category-day">
{{ when.day|escape('html') }}
{{ when.day|e }}
</div>
<div class="schedule-category-hours">
{% for i in when.hours %}
<span>
{{ i.from|escape('html') }} <span class="separator">-</span> {{ i.to|escape('html') }}{% if not loop.last %},{% endif %}
{{ i.from|e }} <span class="separator">-</span> {{ i.to|e }}{% if not loop.last %},{% endif %}
</span>
{% endfor %}
</div>
@ -163,13 +163,13 @@
{% for item in data.pricing %}
<div class="pricing-card">
<div class="pricing-label">
{{ item.priceLabel|escape('html') }}
{{ item.priceLabel|e }}
</div>
<div class="pricing-name">
{{ item.name|escape('html') }}
{{ item.name|e }}
</div>
<div class="pricing-description">
{{ item.description|escape('html') }}
{{ item.description|e }}
</div>
</div>
{% endfor %}
@ -188,7 +188,7 @@
<div class="people-card">
<div class="people-header">
<div class="people-name">
{{ data.contacts.person|escape('html') }}
{{ data.contacts.person|e }}
</div>
<div class="people-role">
Responsable
@ -199,8 +199,8 @@
<svg class="people-contact-icon" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"></path>
</svg>
<a href="mailto:{{ data.contacts.email|escape('html') }}" class="people-email-content">
{{ data.contacts.email|escape('html') }}
<a href="mailto:{{ data.contacts.email|e }}" class="people-email-content">
{{ data.contacts.email|e }}
</a>
</div>
{% if data.contacts.phoneInt is not empty %}
@ -208,8 +208,8 @@
<svg class="people-contact-icon" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"></path>
</svg>
<a href="telto:{{ data.contacts.phoneInt|escape('html') }}" class="people-email-content">
{{ data.contacts.phoneSplit|escape('html') }}
<a href="telto:{{ data.contacts.phoneInt|e }}" class="people-email-content">
{{ data.contacts.phoneSplit|e }}
</a>
</div>
{% endif %}
@ -219,10 +219,10 @@
<div class="people-card">
<div class="people-header">
<div class="people-name">
{{ people.name|escape('html') }}
{{ people.name|e }}
</div>
<div class="people-role">
{{ people.role|escape('html') }}
{{ people.role|e }}
</div>
</div>
<div class="people-contacts">
@ -230,16 +230,16 @@
<svg class="people-contact-icon" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"></path>
</svg>
<a href="mailto:{{ people.email|escape('html') }}" class="people-email-content">
{{ people.email|escape('html') }}
<a href="mailto:{{ people.email|e }}" class="people-email-content">
{{ people.email|e }}
</a>
</div>
<div class="people-contact phone">
<svg class="people-contact-icon" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"></path>
</svg>
<a href="telto:{{ people.phoneInt|escape('html') }}" class="people-email-content">
{{ people.phoneSplit|escape('html') }}
<a href="telto:{{ people.phoneInt|e }}" class="people-email-content">
{{ people.phoneSplit|e }}
</a>
</div>
</div>
@ -293,7 +293,7 @@
</div>
<div class="contact-content">
{% for line in data.contacts.address %}
<div>{{ line|escape('html') }}</div>
<div>{{ line|e }}</div>
{% endfor %}
</div>
</div>
@ -306,8 +306,8 @@
</svg>
</div>
<div class="contact-content">
<a href="{{ data.contacts.website|escape('html') }}">
{{ data.contacts.website|escape('html') }}
<a href="{{ data.contacts.website|e }}">
{{ data.contacts.website|e }}
<svg class="external-link" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<path fill="currentColor" d="M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"></path>
</svg>
@ -323,12 +323,12 @@
</svg>
</div>
<div class="contact-content">
<a href="{{ data.contacts.facebook|escape('html') }}">
<a href="{{ data.contacts.facebook|e }}">
<span class="short">
{{ data.contacts.facebookLabel|escape('html') }}
{{ data.contacts.facebookLabel|e }}
</span>
<span class="long">
{{ data.contacts.facebook|escape('html') }}
{{ data.contacts.facebook|e }}
</span>
<svg class="external-link" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<path fill="currentColor" d="M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"></path>
@ -345,12 +345,12 @@
</svg>
</div>
<div class="contact-content">
<a href="{{ data.contacts.instagram|escape('html') }}">
<a href="{{ data.contacts.instagram|e }}">
<span class="short">
{{ data.contacts.instagramLabel|escape('html') }}
{{ data.contacts.instagramLabel|e }}
</span>
<span class="long">
{{ data.contacts.instagram|escape('html') }}
{{ data.contacts.instagram|e }}
</span>
<svg class="external-link" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<path fill="currentColor" d="M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"></path>
@ -367,12 +367,12 @@
</svg>
</div>
<div class="contact-content">
<a href="{{ data.contacts.twitter|escape('html') }}">
<a href="{{ data.contacts.twitter|e }}">
<span class="short">
{{ data.contacts.twitterLabel|escape('html') }}
{{ data.contacts.twitterLabel|e }}
</span>
<span class="long">
{{ data.contacts.twitter|escape('html') }}
{{ data.contacts.twitter|e }}
</span>
<svg class="external-link" aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<path fill="currentColor" d="M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"></path>