22{% load static %}
33{% load i18n %}
44{% load widget_tweaks %}
5+ {% load petition_extras %}
56
6- {% block title %}{% autoescape off %}{{ petition.title }}{% endautoescape % }{% endblock title %}
7+ {% block title %}{{ petition.title }}{% endblock title %}
78
89<!-- Extra meta -->
910{% block extrameta %}
10- < meta name ="description " content ="{% autoescape off %}{{ petition.title }}{% endautoescape % } "/>
11+ < meta name ="description " content ="{{ petition.title }} "/>
1112
12- < meta property ="og:title " content ="{% autoescape off %}{{ petition.title }}{% endautoescape % } "/>
13+ < meta property ="og:title " content ="{{ petition.title }} "/>
1314{% if petition.twitter_description %}
1415< meta property ="og:description "
15- content ="{% autoescape off%}{{ petition.raw_twitter_description }}{% endautoescape % } "/>
16+ content ="{{ petition.raw_twitter_description|safe } } "/>
1617{% else %}
17- < meta property ="og:description " content ="{% autoescape off %}{{ petition.raw_text }}{% endautoescape % } "/>
18+ < meta property ="og:description " content ="{{ petition.raw_text|safe } } "/>
1819{% endif %}
1920< meta property ="og:type " content ="website "/>
2021< meta property ="og:url " content ="{{ meta.petition_url }} " />
2324< meta property ="og:image " content ="{{ petition.twitter_image }} "/>
2425{% endif %}
2526
26- < meta itemprop ="name " content ="{% autoescape off %}{{ petition.title }}{% endautoescape % } "/>
27+ < meta itemprop ="name " content ="{{ petition.title }} "/>
2728{% if petition.twitter_description %}
2829< meta itemprop ="description "
29- content ="{% autoescape off %}{{ petition.raw_twitter_description }}{% endautoescape % } "/>
30+ content ="{{ petition.raw_twitter_description|safe } } "/>
3031{% else %}
31- < meta itemprop ="description " content ="{% autoescape off %}{{ petition.raw_text }}{% endautoescape % } "/>
32+ < meta itemprop ="description " content ="{{ petition.raw_text|safe } } "/>
3233{% endif %}
3334<!-- FIXME: <meta itemprop="url" content=""/> //-->
3435
3536< meta name ="twitter:card " content ="summary "/>
3637< meta name ="twitter:creator " content ="@yannsionneau "/>
37- < meta name ="twitter:site " content ="{% autoescape off %}{{ petition.org_twitter_handle }}{% endautoescape % } "/>
38- < meta name ="twitter:title " content ="{% autoescape off %}{{ petition.title }}{% endautoescape % } "/>
38+ < meta name ="twitter:site " content ="{{ petition.org_twitter_handle }} "/>
39+ < meta name ="twitter:title " content ="{{ petition.title }} "/>
3940{% if petition.twitter_description %}
4041< meta name ="twitter:description "
41- content ="{% autoescape off %}{{ petition.raw_twitter_description }}{% endautoescape % } "/>
42+ content ="{{ petition.raw_twitter_description|safe } } "/>
4243{% else %}
43- < meta name ="twitter:description " content ="{% autoescape off %}{{ petition.raw_text }}{% endautoescape % } "/>
44+ < meta name ="twitter:description " content ="{{ petition.raw_text|safe } } "/>
4445{% endif %}
4546{% if petition.twitter_image %}
4647< meta name ="twitter:image " content ="{{ petition.twitter_image }} "/>
8687
8788< div class ="container ">
8889 < div class ="jumbotron text-center ">
89- < h1 class ="jumbotron-heading "> {% autoescape off%}{{ petition.title|striptags }}{% endautoescape % }</ h1 >
90+ < h1 class ="jumbotron-heading "> {{ petition.title|html_sanitize| striptags|safe } }</ h1 >
9091 </ div >
9192 < div class ="petition-wrapper ">
9293 < div class ="content ">
9394 < div class ="formular " id ="petition ">
9495 < div class ="form-wrapper ">
9596 {% if petition.side_text %}
9697 < p class ="intro " id ="intro ">
97- {% autoescape off%} {{ petition.side_text }}{% endautoescape % }
98+ {{ petition.side_text|html_sanitize|safe } }
9899 </ p >
99100 {% endif %}
100101 < p class ="sign text-primary "> < strong > Signez la pétition !</ strong > </ p >
@@ -176,7 +177,7 @@ <h1 class="jumbotron-heading">{% autoescape off%}{{ petition.title|striptags }}
176177 </ div >
177178 </ div >
178179 < div class ="presentation ">
179- {% autoescape off%}{{ petition.text }}{% endautoescape % }
180+ {{ petition.text|html_sanitize|safe } }
180181 </ div >
181182 </ div >
182183 </ div >
@@ -193,10 +194,10 @@ <h1 class="jumbotron-heading">{% autoescape off%}{{ petition.title|striptags }}
193194< div class ="footer-wrapper bg-dark ">
194195 < footer role ="contentinfo " class ="footer ">
195196 < div class ="footer-links ">
196- {% autoescape off %}{{ petition.footer_links }}{% endautoescape % }
197+ {{ petition.footer_links|html_sanitize|safe } }
197198 </ div >
198199 < div class ="footer-text ">
199- {% autoescape off %}{{ petition.footer_text }}{% endautoescape % }
200+ {{ petition.footer_text|html_sanitize|safe } }
200201 </ div >
201202 </ footer >
202203</ div >
0 commit comments