-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No method to escape Markdown user input without breaking block quotes #200
Comments
NB, the spec is https://github.com/jgm/CommonMark, so, this issue probably belongs on commonmark itself, rather than this implementation of it. |
It might be possible if you tinker with adding/removing/adjusting the HTML I'm currently out-of-town and I'll be very busy over the next few weeks, so On Sat, Oct 31, 2015, 4:31 AM Graham Campbell notifications@github.com
|
Would still be nice if we could get this into the official spec in some way since it's surely a pretty common thing people want from markdown. |
Based on my research, the spec maintainers have decided that this doesn't belong in the spec:
The JS reference parser has implemented a |
@colinodell That looks great.:thumbsup: |
#201 has been merged. I'll try to tag a new release later today. |
There's no satisfactory way to escape user-submitted Markdown as it uses the the angle bracket
>
for a block quote, which is escaped into>
by default.Example:
Escaped:
The issue here is that the blockquote is no longer recognized as valid Markdown. One solution could be adding your own escape function that ignores all right-angle brackets that are the first character on a line, which would instead convert it to:
... which then would result in the expected Markdown, with the blockquote intact. Another solution would be to treat the characters
>
as the right angle bracket itself.I'm not sure about the impact or complexity of these solutions, so feel free to just throw them out the window.
The text was updated successfully, but these errors were encountered: