Currently, SE accepts HTML comments (e.g. <!-- this is an HTML comment -->) as valid input for posts but they don't appear (since they are comments) this allows some users to get around the 30 character minimum limit for posts. It is even possible to make an empty post!

Some sites, like Stack Apps, use HTML comments for metadata about the post. Programming sites currently accept them to define the programming language, but as SE switches over to the new CommonMark standard, the language will have to be defined in a code fence.

So in all sites that don't accept metadata in comments, SE should render them as text to stop users from getting around the 30 character minimum limit.

  • 1
    Please link to an existing "empty" answer, e.g. in sandbox, instead of littering your question with one. Jun 8, 2020 at 12:06
  • @ShadowKeepsSocialDistance The sandbox is emptied occasionally, isn't it -- it's impermanent.
    – ChrisW
    Jun 8, 2020 at 12:07
  • @ShadowKeepsSocialDistance done
    – Aryan
    Jun 8, 2020 at 12:09
  • 2
    @ChrisW it was emptied only once during all those years, so permanent enough. :) Jun 8, 2020 at 12:21

3 Answers 3


We have pretty sensible users with various degrees of moderation privileges that quickly evict any posts that abuse those HTML comments.

And there is escalation possible by means of custom moderator flags if a user keeps repeating their abuse.

On top of that, SE doesn't have a very good track record on "detecting" nonsensical things ("title filter" anyone?) so I rather not have them go implement a feature that is hard to get right, 99% of times wrong and annoys unsuspecting users that have a valid use of those comments, including the Meta crowd that might have to diagnose these ("your post contains mainly code" anyone?).

In a comment you say

I don't want to delete the HTML comment, but to instead render is as plaintext

so I guess you want to remove the ability for users to give useful hints for editors like

<!-- XHTML is intentional!  Markdown can be weird and capricious, so
I opt-in for XHTML instead.  Please, do NOT edit my messages back to
Markdown.  Thank you!  -->


<!-- Do not remove or edit -->
<!-- Note: Questions not about your post will be deleted -->

and instead put that in plain sight? That doesn't sound like a great feature either.

  • I don't want to delete the HTML comment, but to instead render is as plaintext
    – Aryan
    Jun 8, 2020 at 12:24
  • 2
    I think the biggest concern here is that we... uh... allow "empty" posts for some reason... but this seems like a regression... this used to not be possible.
    – Catija
    Jun 8, 2020 at 13:40
  • @Catija for as long as I've been here I've seen ways to circumvent the checks that test for emptiness. There are certainly checks in the software. And I don't want to blame any of the SE devs for not getting that right, I would simply not try to fix that. You have an awesome community around here that are much better at detecting that posts are "empty" and handle those posts accordingly.
    – rene
    Jun 8, 2020 at 14:11

While I agree it's not really useful most of the times, misusing HTML comments is not different from misusing other things and should be handled the same: if you notice someone bypassing minimum characters limit on purpose several times with the comments, flag one of the posts and ask a moderator to take a look.

If the moderator will find it harmful enough, a warning can be sent to the user.

Better not outright block the ability to add HTML comments.

  • I'm asking to block on sites that don't use it, or to render is as text
    – Aryan
    Jun 8, 2020 at 12:10
  • @Aryan define "don't use it"? Also, not sure that markdown can be customized this way per-site, technically, to block certain elements. Jun 8, 2020 at 12:11
  • By don't use it I mean that they don't use it for metadata like StackApps
    – Aryan
    Jun 8, 2020 at 12:21
  • Well on meta sites like this it can be used to pass hidden messages... kind of a "non hidden hidden feature" that makes SE special. On main sites it shouldn't be used just for fun, but still.... no point to waste time (of the developers) in blocking it. :) Jun 8, 2020 at 12:25

It’s very easy to see if someone’s using comments to get around the minimum character limit because the post will look extremely short. These posts will almost always get downvoted or closed or deleted.

On the other hand, I find HTML comments extremely useful occasionally to either keep notes for myself (eg links to a paywalled site I got a quote from, in case I’m asked for more info) or to leave notes for editors (eg adding “sic” for quotes without it interrupting the flow of the text). I’ve done this on sites with no connection to programming, so there’s no helpful way to filter this.

My vote is therefore no, keep it as it is.

Not the answer you're looking for? Browse other questions tagged .