From 2199fbf4fdbb6a799d3263834fc4abb5d1c3a171 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 25 2019 16:13:39 +0000 Subject: Allow div element to have id tags This basically fixes internal references within a rst document by allowing the anchor to be created. Fixes https://pagure.io/pagure/issue/2096 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/query.py b/pagure/lib/query.py index 325fa61..af0619c 100644 --- a/pagure/lib/query.py +++ b/pagure/lib/query.py @@ -4274,7 +4274,7 @@ def clean_input(text, ignore=None): attrs = bleach.ALLOWED_ATTRIBUTES.copy() attrs["table"] = ["class"] attrs["span"] = ["class", "id"] - attrs["div"] = ["class"] + attrs["div"] = ["class", "id"] attrs["td"] = ["align"] attrs["th"] = ["align"] if not ignore or "img" not in ignore: