Skip to content
Snippets Groups Projects
Commit 29428e7b authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'fix/add-class-to-el-multiple-classes' into 'master'

Fix add_class_to_el templatetag to work with lists for classes

See merge request AlekSIS/official/AlekSIS!342
parents a4e097c1 34e169a5
No related branches found
No related tags found
1 merge request!342Fix add_class_to_el templatetag to work with lists for classes
Pipeline #3243 failed
......@@ -15,6 +15,6 @@ def add_class_to_el(value: str, arg: str) -> str:
soup = BeautifulSoup(value, "html.parser")
for el in soup.find_all(el):
el["class"] = el.get("class", "") + f" {cls}"
el["class"] = el.get("class", []) + [cls]
return str(soup)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment