codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 69 forks source link

Code block in a <summary> overflows the post bounds #1249

Open cellio opened 9 months ago

cellio commented 9 months ago

meta:288974

If someone uses a code block as the summary text in a <summary>/<details> block, the text can overflow the bounds of the post body:

screenshot

See the linked post for more examples.

We don't need to support such uses of these HTML tags, but we should prevent the overflow. I don't care if we use horizontal scrolling, truncate with "...", or something else I haven't thought of, but let's enforce the boundary somehow.