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

No Escaping of HTML #38

Closed
jpillora opened this issue Dec 8, 2012 · 4 comments
Closed

No Escaping of HTML #38

jpillora opened this issue Dec 8, 2012 · 4 comments
Labels

Comments

@jpillora
Copy link

jpillora commented Dec 8, 2012

I paste in the snippet:

3 backticks "html"
some html source with script tags
3 backticks

Instead of escaping the html, it puts it in the editor unescaped and gets parsed as HTML and the script loads and it just so happens that it breaks the loading sequence of dillinger, so its all saved instantly in a local cache (i presume), so upon refresh dillinger.io is irreversibly completely broken.

Escaping all HTML would solve this 😄

@joemccann
Copy link
Owner

Interesting bug in showdown.js, the client side markdown rendering library. If the library marked solves this, then let's switch. Can you verify marked and/or showdown can fix this? It is not dillinger specific.

@jpillora
Copy link
Author

jpillora commented Jan 4, 2013

Could you just HTML encode all text before mark downing it ? Try using:

$('

').text(value).html();

On Saturday, January 5, 2013, Joe McCann wrote:

Interesting bug in showdown.js, the client side markdown rendering
library. If the library marked solves this, then let's switch. Can you
verify marked and/or showdown can fix this? It is not dillinger specific.


Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-11884357.

@joemccann
Copy link
Owner

I suppose. Fork it and give it a try!

@joemccann
Copy link
Owner

Fixed with marked library.

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

No branches or pull requests

2 participants