Skip to content
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

HTML comments are included in p tag #253

Closed
adius opened this issue Sep 24, 2013 · 6 comments
Closed

HTML comments are included in p tag #253

adius opened this issue Sep 24, 2013 · 6 comments

Comments

@adius
Copy link

adius commented Sep 24, 2013

When using

var tokens = marked.lexer(text, options)
marked.parser(tokens)

HTML comments will get included into a p tag and so be visible in the output!

@alexilyaev
Copy link

Is there any update on this one?

I'm seeing my comments in the resulting HTML.
And I see there's other people reporting this as well.

Testing with:

<!-- Test Comment -->

Result:

<p>&lt;!-- Test Comment --&gt;
</p>

@felipap
Copy link

felipap commented Jun 14, 2015

Bump?

@travs
Copy link

travs commented Jul 10, 2015

+1 👍

@bryanjacquot
Copy link

+1

@joshbruce
Copy link
Member

#985

@Feder1co5oave
Copy link
Contributor

If you're sanitizing your input, it means you're not allowing html elements to be left as-is in the output. So why are you expecting marked to hide html comments?

Or maybe, you're trying to leave (invisible) comments in your markdown, but do not want to allow html in it. And that could be interesting too.
The fix could be to not escape html comments as an exception, so that they would be hidden in the html render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants