[damned-lies] Add anonymous crossorigin for some external resources



commit 128c306011dad5e5ad354bf00457862b588e0607
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Jun 25 10:33:17 2020 +0200

    Add anonymous crossorigin for some external resources

 people/templatetags/people.py | 2 +-
 templates/base.html           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/people/templatetags/people.py b/people/templatetags/people.py
index d355f150..4770c69f 100644
--- a/people/templatetags/people.py
+++ b/people/templatetags/people.py
@@ -34,7 +34,7 @@ def people_image(person):
             qs=urlencode([('s', '80'), ('d', 'identicon'), ('r', 'g')])
         )
         tag = format_html(
-            '<img class="img-circle" src="{url}" alt="{alt}">', url=url, alt=_("avatar icon")
+            '<img class="img-circle" src="{url}" alt="{alt}" crossorigin="anonymous">', url=url, 
alt=_("avatar icon")
         )
     elif person.image:
         tag = format_html(
diff --git a/templates/base.html b/templates/base.html
index 619ff359..b689f771 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,7 +7,7 @@
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <title>{% block title %}page title{% endblock %}</title>
   <link rel="icon" type="image/png" href="{{ STATIC_URL }}img/favicon.ico">
-  <link rel="stylesheet" type="text/css" href="https://static.gnome.org/css/deneb.min.css";>
+  <link rel="stylesheet" type="text/css" href="https://static.gnome.org/css/deneb.min.css"; 
crossorigin="anonymous">
   <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/template.css">
 {% if LANGUAGE_BIDI %}
   <link rel="stylesheet" href="{{ STATIC_URL }}css/rtl.css">
@@ -142,6 +142,6 @@
     </div>
 </div>
 
-<script src="https://static.gnome.org/js/deneb.min.js";></script>
+<script src="https://static.gnome.org/js/deneb.min.js"; crossorigin="anonymous"></script>
 </body>
 </html>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]