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 "town hall" (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.

Hidden details leak through post previews

+3
−0
The following should be hiddenTHIS ISN'T HIDDEN... (this is currently visible from the question list)

Information hidden behind a <details> tag in a post is revealed in the plain text preview of that post, for example in the question list or in search results (where this happens for both questions and answers).

This may not be expected to be a problem in practice, since most details sections are later in the post than will show in the preview. However, there are some cases where spoilers are near the beginning of a post, such as in answers to puzzles. Searching Proposals for answers that contain the phrase "click here" gives 3 examples (at the time of writing, although more are likely to follow, and more currently exist that just use a different phrase than "click here"). The solutions to the 3 puzzles are immediately visible in the search results:

WARNING: CONTAINS IMMEDIATE UNHIDDEN SPOILERS (if you're not sure if you want to see spoilers, you could first check the puzzles tag in Proposals to see if there are any puzzles you want to try before seeing spoilers).

What would be the best approach to avoid this? Should the opening and closing tags of the details section, and everything between them, be omitted from the preview? Should the preview be rendered like a post, rather than showing as raw text? Would this mean cutting off the preview by height rather than number of characters?

History

0 comment threads

Sign up to answer this question »