50 points · by rayshan · 12y ago · 11 comments
http://typographyforlawyers.com/paragraph-and-section-marks....
Upvoted to help with this issue: https://github.com/jonschlinkert/remarkable/issues/34
EDIT: a ton of projects allow users to write markdown, but markdown allows, for example, raw html, which means letting a user input "full markdown" means leaving a gaping security hole. The CommonMark spec does not seem to consider the issue at all, but it seems like it should.
If the presented form is "plain text" then encoding all html tags is an effective choice, if the presented form is "rich text" than tag/attribute whitelisting is necessary and you need to strip "bad stuff".
The choice of presentation, combined with the choice of who is inputting the data, also poses problems in the UX, i.e. if you use a JS markdown editor in the browser and process data in python on the server stripping HTML than the user sees something going in and something else going out.
A common standard of how to do safe markdown would help.