Skip to content

Commit

Permalink
Merge pull request #398 from Pet-projects-CodePET/refactor/requests_a…
Browse files Browse the repository at this point in the history
…nd_serializers

refactor: style-css wrong?
  • Loading branch information
Denis-Shtanskiy authored Jan 5, 2025
2 parents b3a3438 + 93d8703 commit 79bbf4c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/backend/api/v1/profile/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
ProfessionSerializer,
SkillSerializer,
)
from api.v1.profile.constants import (
ALLOWED_ATTRIBUTES_BY_FRONT,
ALLOWED_TAGS_BY_FRONT,
)

# from api.v1.profile.constants import (
# ALLOWED_ATTRIBUTES_BY_FRONT,
# ALLOWED_TAGS_BY_FRONT,
# )
from apps.general.constants import MAX_SKILLS, MAX_SKILLS_MESSAGE
from apps.general.models import Profession
from apps.profile.constants import MAX_SPECIALISTS, MAX_SPECIALISTS_MESSAGE
Expand Down Expand Up @@ -270,9 +271,5 @@ def validate_about(self, value):
HTML-тегов и атрибутов.
"""

safe_about = bleach.clean(
value,
tags=ALLOWED_TAGS_BY_FRONT,
attributes=ALLOWED_ATTRIBUTES_BY_FRONT,
)
safe_about = bleach.clean(value)
return safe_about

0 comments on commit 79bbf4c

Please sign in to comment.