Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on The body of this post is empty

Parent

The body of this post is empty

+3
−1

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+5
−1

Explanation

When submitting a post with nothing in the body, we get this error:

Screenshot

But according to this page (formatting stripped):

HTML tags that do not appear on this list will be stripped out and not displayed if they are included in posts or comments. The source code for supported tags in posts can be found in posts_helper.rb, and for comments in comments_helper.rb.

So one can just enter something like this:

Screenshot

...to make the invalid tags get stripped out and leave the question with an empty body.

Edit: It appears to work even with supported tags, for example, <b></b>

Such useless posts can be flagged instead for speedy deletion

If such kinds of posts don't exist in the first place then the moderator workload can become lesser.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Validating length after stripping unsupported HTML seems like a good idea to me. In contexts where t... (4 comments)
Validating length after stripping unsupported HTML seems like a good idea to me. In contexts where t...
Monica Cellio‭ wrote 9 months ago

Validating length after stripping unsupported HTML seems like a good idea to me. In contexts where the minimum length is longer, this would look like a post (not a blank page) and people would want to know why the length wasn't enforced.

meta user‭ wrote 9 months ago · edited 9 months ago

Monica Cellio‭ just tested with rev 2 of question and it appears to work even with supported tags (example:<b></b>)

So I guess all tags should be stripped, whether they are supported or not

trichoplax‭ wrote 9 months ago

There's already the suggestion of measuring the length requirements after converting to HTML (which would exclude the stripped out tags) to handle the problem at the other end of the length scale: False positive for 30,000 character limit which has a GitHub issue. Two approaches are suggested and the one that involves measuring after converting to HTML might solve this bug too.

Monica Cellio‭ wrote 9 months ago

I've updated that GitHub issue with a link here. Thanks for finding that, trichoplax‭.