Skip to content
Snippets Groups Projects
Verified Commit d52396d0 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix add_class_to_el templatetag to work with lists for classes

parent a7297271
No related branches found
No related tags found
1 merge request!342Fix add_class_to_el templatetag to work with lists for classes
Pipeline #3239 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