Empty comments are possible #191

Closed
opened 2023-08-12 03:51:47 +00:00 by Saltus · 2 comments

There's an unintended interaction with BeautifulSoup's parsing

0f8c75f252/files/helpers/sanitize.py (L501)

This line will construct a tree with empty string representation if the first encountered tag is a paragraph closer followed by another tag:

</p><i>everything here will be stripped from the comment</i>

resulting in an empty comment circumventing the empty comment checker.
image

There's an unintended interaction with BeautifulSoup's parsing https://fsdfsd.net/rDrama/rDrama/src/commit/0f8c75f252e7cbe0cfa8fe21b9a19e11d8ffd2f4/files/helpers/sanitize.py#L501 This line will construct a tree with empty string representation if the first encountered tag is a paragraph closer followed by another tag: ``` </p><i>everything here will be stripped from the comment</i> ``` resulting in an empty comment circumventing the empty comment checker. ![image](/attachments/16a7f0bf-f2b6-4aa2-9991-1690e2de7a8c)
8.4 KiB

Oh, looks like the paragraph closer is not necessary.
image

Oh, looks like the paragraph closer is not necessary. ![image](/attachments/52a4b96c-ee6d-4ea2-927a-381e37f62a7b)
8.8 KiB

not rly a problem, empty comments are funny
u can make them much easier just making a comment with <p> or <span>

not rly a problem, empty comments are funny u can make them much easier just making a comment with `<p>` or `<span>`
Sign in to join this conversation.
There is no content yet.