mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: Allow <del> and <details/summary> tags in comments
* Allow additional html tags: <del> and <details/summary> * Convert markdown double-tilde (~~) to <del> tags Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
029ce3b418
commit
765f989b7d
2 changed files with 25 additions and 0 deletions
|
@ -105,6 +105,13 @@ def test_markdown_conversion(user: User, pkgbase: PackageBase):
|
|||
assert comment.RenderedComment == expected
|
||||
|
||||
|
||||
def test_markdown_strikethrough(user: User, pkgbase: PackageBase):
|
||||
text = "*~~Hello~~world*~~!~~"
|
||||
comment = create_comment(user, pkgbase, text)
|
||||
expected = "<p><em><del>Hello</del>world</em><del>!</del></p>"
|
||||
assert comment.RenderedComment == expected
|
||||
|
||||
|
||||
def test_html_sanitization(user: User, pkgbase: PackageBase):
|
||||
text = '<script>alert("XSS!")</script>'
|
||||
comment = create_comment(user, pkgbase, text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue