Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed HTML attribute validation
  • Loading branch information
jsangmeister committed Nov 20, 2020
1 parent bed9b3a commit f3809fc
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions server/openslides/utils/validate.py
Expand Up @@ -43,12 +43,40 @@
"video",
]

allowed_attributes = [
"align",
"alt",
"autoplay",
"background",
"bgcolor",
"border",
"class",
"colspan",
"controls",
"dir",
"height",
"hidden",
"href",
"hreflang",
"id",
"lang",
"loop",
"muted",
"poster",
"preload",
"rel",
"rowspan",
"scope",
"sizes",
"src",
"srcset",
"start",
"style",
"target",
"title",
"width",
]

def allow_all(tag: str, name: str, value: str) -> bool:
return True


allowed_attributes = allow_all
allowed_styles = [
"color",
"background-color",
Expand Down

0 comments on commit f3809fc

Please sign in to comment.