diff --git a/frontends/etiquette_flask/backend/jinja_filters.py b/frontends/etiquette_flask/backend/jinja_filters.py index 7142a03..2f3830c 100644 --- a/frontends/etiquette_flask/backend/jinja_filters.py +++ b/frontends/etiquette_flask/backend/jinja_filters.py @@ -68,7 +68,11 @@ def users_to_usernames(users): @global_function def make_attributes(*booleans, **keyvalues): - keyvalues = {key: value for (key, value) in keyvalues.items() if value is not None} + keyvalues = { + key.replace('_', '-'): value + for (key, value) in keyvalues.items() + if value is not None + } attributes = [f'{key}="{jinja2.filters.escape(value)}"' for (key, value) in keyvalues.items()] attributes.extend(booleans) attributes = ' '.join(attributes)