disallow comments in css

pull/127/head
Aevann 2023-02-18 21:49:11 +02:00
parent 44914cd166
commit cd2d36e8ef
1 changed files with 3 additions and 0 deletions

View File

@ -621,6 +621,9 @@ def validate_css(css):
if '@import' in css:
return False, "@import statements are not allowed!"
if '/**/' in css:
return False, "Comments are not allowed!"
for i in css_url_regex.finditer(css):
url = i.group(1)
if not is_safe_url(url):