Skip to content

Commit

Permalink
chore: Update requirements to support bleach[css]
Browse files Browse the repository at this point in the history
  • Loading branch information
macdiesel committed Oct 28, 2024
1 parent 7fef60c commit c2b2aab
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 29 deletions.
1 change: 1 addition & 0 deletions license_manager/apps/subscriptions/sanitize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bleach
from bleach.css_sanitizer import CSSSanitizer


def sanitize_html(html_content):
"""
Sanitize HTML content to allow only safe tags and attributes,
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ simplejson
zipp
django-log-request-id
bleach
bleach[css]
12 changes: 8 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ backoff==1.10.0
# analytics-python
billiard==4.2.1
# via celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/base.in
boto3==1.35.48
boto3==1.35.49
# via django-ses
botocore==1.35.48
botocore==1.35.49
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -289,6 +289,8 @@ stevedore==5.3.0
# edx-opaque-keys
text-unidecode==1.3
# via python-slugify
tinycss2==1.2.1
# via bleach
typing-extensions==4.12.2
# via edx-opaque-keys
tzdata==2024.2
Expand All @@ -309,7 +311,9 @@ vine==5.1.0
wcwidth==0.2.13
# via prompt-toolkit
webencodings==0.5.1
# via bleach
# via
# bleach
# tinycss2
zipp==3.20.2
# via -r requirements/base.in

Expand Down
4 changes: 4 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ elasticsearch<7.14.0
# This can be unpinned once https://github.com/openedx/edx-platform/issues/34586
# has been resolved and edx-platform is running with pymongo>=4.4.0
event-tracking<2.4.1

# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3
15 changes: 10 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ billiard==4.2.1
# via
# -r requirements/validation.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/validation.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/validation.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/validation.txt
# boto3
Expand Down Expand Up @@ -240,7 +240,7 @@ edx-drf-extensions==10.5.0
# edx-rbac
edx-i18n-tools==1.6.3
# via -r requirements/validation.txt
edx-lint==5.4.0
edx-lint==5.4.1
# via -r requirements/validation.txt
edx-opaque-keys==2.11.0
# via
Expand Down Expand Up @@ -550,11 +550,15 @@ text-unidecode==1.3
# via
# -r requirements/validation.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/validation.txt
# bleach
tomlkit==0.13.2
# via
# -r requirements/validation.txt
# pylint
typeguard==4.3.0
typeguard==4.4.0
# via inflect
typing-extensions==4.12.2
# via
Expand Down Expand Up @@ -590,6 +594,7 @@ webencodings==0.5.1
# via
# -r requirements/validation.txt
# bleach
# tinycss2
wheel==0.44.0
# via
# -r requirements/pip-tools.txt
Expand Down
13 changes: 9 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ billiard==4.2.1
# via
# -r requirements/test.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/test.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/test.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/test.txt
# boto3
Expand Down Expand Up @@ -239,7 +239,7 @@ edx-drf-extensions==10.5.0
# via
# -r requirements/test.txt
# edx-rbac
edx-lint==5.4.0
edx-lint==5.4.1
# via -r requirements/test.txt
edx-opaque-keys==2.11.0
# via
Expand Down Expand Up @@ -535,6 +535,10 @@ text-unidecode==1.3
# via
# -r requirements/test.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/test.txt
# bleach
tomlkit==0.13.2
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -573,6 +577,7 @@ webencodings==0.5.1
# via
# -r requirements/test.txt
# bleach
# tinycss2
zipp==3.20.2
# via -r requirements/test.txt

Expand Down
4 changes: 3 additions & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ wheel==0.44.0

# The following packages are considered to be unsafe in a requirements file:
pip==24.2
# via -r requirements/pip.in
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
setuptools==75.2.0
# via -r requirements/pip.in
11 changes: 8 additions & 3 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ billiard==4.2.1
# via
# -r requirements/base.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/base.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/base.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/base.txt
# boto3
Expand Down Expand Up @@ -395,6 +395,10 @@ text-unidecode==1.3
# via
# -r requirements/base.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/base.txt
# bleach
typing-extensions==4.12.2
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -427,6 +431,7 @@ webencodings==0.5.1
# via
# -r requirements/base.txt
# bleach
# tinycss2
zipp==3.20.2
# via -r requirements/base.txt
zope-event==5.0
Expand Down
13 changes: 9 additions & 4 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ billiard==4.2.1
# via
# -r requirements/base.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/base.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/base.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/base.txt
# boto3
Expand Down Expand Up @@ -207,7 +207,7 @@ edx-drf-extensions==10.5.0
# via
# -r requirements/base.txt
# edx-rbac
edx-lint==5.4.0
edx-lint==5.4.1
# via -r requirements/quality.in
edx-opaque-keys==2.11.0
# via
Expand Down Expand Up @@ -424,6 +424,10 @@ text-unidecode==1.3
# via
# -r requirements/base.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/base.txt
# bleach
tomlkit==0.13.2
# via pylint
typing-extensions==4.12.2
Expand Down Expand Up @@ -458,6 +462,7 @@ webencodings==0.5.1
# via
# -r requirements/base.txt
# bleach
# tinycss2
zipp==3.20.2
# via -r requirements/base.txt

Expand Down
13 changes: 9 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ billiard==4.2.1
# via
# -r requirements/base.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via -r requirements/base.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/base.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/base.txt
# boto3
Expand Down Expand Up @@ -216,7 +216,7 @@ edx-drf-extensions==10.5.0
# via
# -r requirements/base.txt
# edx-rbac
edx-lint==5.4.0
edx-lint==5.4.1
# via -r requirements/test.in
edx-opaque-keys==2.11.0
# via
Expand Down Expand Up @@ -447,6 +447,10 @@ text-unidecode==1.3
# via
# -r requirements/base.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/base.txt
# bleach
tomlkit==0.13.2
# via pylint
typing-extensions==4.12.2
Expand Down Expand Up @@ -482,6 +486,7 @@ webencodings==0.5.1
# via
# -r requirements/base.txt
# bleach
# tinycss2
zipp==3.20.2
# via -r requirements/base.txt

Expand Down
14 changes: 10 additions & 4 deletions requirements/validation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ billiard==4.2.1
# -r requirements/quality.txt
# -r requirements/test.txt
# celery
bleach==6.1.0
bleach[css]==6.1.0
# via
# -r requirements/quality.txt
# -r requirements/test.txt
boto3==1.35.48
boto3==1.35.49
# via
# -r requirements/quality.txt
# -r requirements/test.txt
# django-ses
botocore==1.35.48
botocore==1.35.49
# via
# -r requirements/quality.txt
# -r requirements/test.txt
Expand Down Expand Up @@ -289,7 +289,7 @@ edx-drf-extensions==10.5.0
# edx-rbac
edx-i18n-tools==1.6.3
# via -r requirements/validation.in
edx-lint==5.4.0
edx-lint==5.4.1
# via
# -r requirements/quality.txt
# -r requirements/test.txt
Expand Down Expand Up @@ -627,6 +627,11 @@ text-unidecode==1.3
# -r requirements/quality.txt
# -r requirements/test.txt
# python-slugify
tinycss2==1.2.1
# via
# -r requirements/quality.txt
# -r requirements/test.txt
# bleach
tomlkit==0.13.2
# via
# -r requirements/quality.txt
Expand Down Expand Up @@ -672,6 +677,7 @@ webencodings==0.5.1
# -r requirements/quality.txt
# -r requirements/test.txt
# bleach
# tinycss2
zipp==3.20.2
# via
# -r requirements/quality.txt
Expand Down

0 comments on commit c2b2aab

Please sign in to comment.