diff --git a/elections2021/templatetags/elections2021_extras.py b/elections2021/templatetags/elections2021_extras.py index 5b13e257dac446665ae2501175d26c82ecede796..c9d7f4bd1c66fced5627298f59c3bbbf0aa162b6 100644 --- a/elections2021/templatetags/elections2021_extras.py +++ b/elections2021/templatetags/elections2021_extras.py @@ -15,7 +15,7 @@ def format_sources_block(value): number = None text = "" - for item in soup.children: + for item in soup.find_all("p"): for a in item.find_all("a"): a["class"] = "text-fxactivecolor underline"