changeset 4beaf3d17ffe in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=4beaf3d17ffe
description:
        Do not set canonical if it is already the requested URL
diffstat:

 templates/layout.html |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 64e5bc783646 -r 4beaf3d17ffe templates/layout.html
--- a/templates/layout.html     Wed Dec 18 09:12:34 2019 +0100
+++ b/templates/layout.html     Sat Jan 11 19:00:19 2020 +0100
@@ -34,9 +34,9 @@
         {%- if canonical is not defined %}
         {%- set canonical = url_for_canonical() %}
         {%- endif %}
-        {%- if canonical %}
+        {% if canonical != request.url %}
         <link rel="canonical" href="{{ canonical }}"/>
-        {%- endif %}
+        {% endif %}
 
         {% block style %}
         <link rel="stylesheet" href="{{ url_for('static', 
filename='css/main.css') }}"/>

Reply via email to