Skip to content

Commit

Permalink
Merge pull request #49 from taoky/fix-sanitize-typo
Browse files Browse the repository at this point in the history
Fix typo in sanitize()
  • Loading branch information
bojieli committed Apr 25, 2024
2 parents eaeab35 + e1af4ad commit a2fc883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def sanitize(text):
text = re.sub(r'<img ([^>]*) style="width:[0-9]+px; height:[0-9]+px"', r'<img \1', text)
# add new rules for CKEditor 5
text = re.sub(r'<img ([^>]*) width="[0-9]+" height="[0-9]+"', r'<img \1', text)
text = re.sub(r'<img ([^>]*) height="[0-9]+" height="[0-9]+"', r'<img \1', text)
text = re.sub(r'<img ([^>]*) height="[0-9]+" width="[0-9]+"', r'<img \1', text)
return text


Expand Down

0 comments on commit a2fc883

Please sign in to comment.