Fix incorrect anchors on event archive
authorDaniel Gustafsson <daniel@yesql.se>
Thu, 1 Feb 2018 19:50:50 +0000 (20:50 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 1 Feb 2018 19:50:50 +0000 (20:50 +0100)
The name attribute of an anchor link cannot contain spaces,
pass the header name via the slugify filter to ensure it's
compliant.

templates/events/archive.html

index 962b156e13b0671da8087142ef456ab43b3d7b2d..ebc03e650cc5e26797bbb823c1c46abd5d772bdd 100644 (file)
@@ -5,7 +5,7 @@
 
 <h1>{{title}}</h1>
 {%for eventblock in eventblocks%}
-{%if eventblocks|length > 1%}<h2><a name="{{eventblock.name}}">{{eventblock.name}}</a></h2>{%endif%}
+{%if eventblocks|length > 1%}<h2><a name="{{eventblock.anchor|slugify}}">{{eventblock.name}}</a></h2>{%endif%}
 <p>
 <i><b>Note:</b> The PostgreSQL Global Development Group does not endorse any
 events run by third parties. No guarantee of the quality of events is offered