From e89b0751baa13cbaf8d4936f427073093c4f418b Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 7 Jan 2019 21:50:59 -0700 Subject: [PATCH] Fix invalid CSS class on hierarchical topic tags When a topic tag was using the hierarchy (for something like "science.biology"), it would set an invalid class on the tag label, because it would include the period(s), which can't be used in CSS classes. This fixes it so that periods will be replaced with dashes. --- .../templates/includes/topic_tags.jinja2 | 6 ++--- tildes/tildes/templates/macros/topics.jinja2 | 22 +++++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tildes/tildes/templates/includes/topic_tags.jinja2 b/tildes/tildes/templates/includes/topic_tags.jinja2 index 894c3b2..574b002 100644 --- a/tildes/tildes/templates/includes/topic_tags.jinja2 +++ b/tildes/tildes/templates/includes/topic_tags.jinja2 @@ -1,11 +1,11 @@ {# Copyright (c) 2018 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} +{% from 'macros/topics.jinja2' import topic_tag %} +