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

Chrome Renderer crashes #23

Closed
rcarmo opened this issue Jan 24, 2012 · 4 comments
Closed

Chrome Renderer crashes #23

rcarmo opened this issue Jan 24, 2012 · 4 comments

Comments

@rcarmo
Copy link

rcarmo commented Jan 24, 2012

I've been doing a few tests with marked, and I've found that if I feed it large documents with embedded HTML (or plain HTML alone), it will crash Chrome Renderer.

I've been able to reproduce this reliably by force-feeding it raw HTML - notably the contents of the container div at http://oss.sapo.pt/ (which I'm re-doing using marked, BTW - you'll notice the site currently fetches Markdown and parses it on the fly using showdown...).

Further testing reveals that Safari and Firefox are immune to this, BTW - I can toss in the same documents and they come out fine.

@chjj
Copy link
Member

chjj commented Jan 24, 2012

Very odd, could you link me to the exact markdown you're feeding it?

@rcarmo
Copy link
Author

rcarmo commented Jan 24, 2012

Sure:

http://dl.dropbox.com/u/4300/Sites/oss.sapo.pt/pages/index.html is the HTML fragment I noticed this in.

The use case would be something like:

var xhr = $.get(url, function(data) {
markup = marked(data); // <- crash

The HTML is overkill, I know, but showdown had no problems with it.

(I suggest you copy it to a buffer, I might remove it later)

http://dl.dropbox.com/u/4300/Sites/oss.sapo.pt/dev.html is a copy of the entire site without minification (most of it should work)

On Jan 24, 2012, at 17:49 , Christopher Jeffrey wrote:

Very odd, could you link me to the exact markdown you're feeding it?


Reply to this email directly or view it on GitHub:
#23 (comment)

@chjj
Copy link
Member

chjj commented Jan 24, 2012

The html rule's regex tries to match infinitely. This appears to be a bug in v8 if it works with other browsers. I'll change it around and push a fix soon.

Anyway, I wouldn't recommend feeding that html to any markdown implementation. markdown.pl, discount, and upskirt all produce misnested tags for that piece of html. Marked might also produced misnested tags once I push the fix.

@rcarmo
Copy link
Author

rcarmo commented Jan 24, 2012

Great, thanks. My concern was that the loop might happen with smaller chunks of HTML - this was merely the one chunk I was having trouble with, and the one where I could reproduce the issue easily in Chrome (I was developing in Safari first).

On 24/01/2012, at 19:07, Christopher Jeffreyreply@reply.github.com wrote:

The html rule's regex tries to match infinitely. This appears to be a bug in v8 if it works with other browsers. I'll change it around and push a fix soon.

Anyway, I wouldn't recommend feeding that html to any markdown implementation. markdown.pl, discount, and upskirt all produce misnested tags for that piece of html. Marked might also produced misnested tags once I push the fix.


Reply to this email directly or view it on GitHub:
#23 (comment)

@chjj chjj closed this as completed in bb190a2 Jan 25, 2012
ghost pushed a commit to zergeborg/marked that referenced this issue May 13, 2016
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

2 participants