evilstreak / markdown-js

A Markdown parser for javascript
7.7k stars 863 forks source link

code block mis-escaped #91

Closed Magicloud closed 11 years ago

Magicloud commented 11 years ago

For example: \t\techo "x" > /tmp/file

will be translated to:

echo "x" > /tmp/file

Then in chromium, the > is not show as ">".

ashb commented 11 years ago
echo -e '\t\techo "x" > /tmp/file' | md2html > foo.html

then opening that foo.html gives me this

screen shot 2013-05-22 at 11 25 26

Can you double check your input and the output - I can't reproduce this.

Magicloud commented 11 years ago

I am using the javascript in browser. After I replace the call to escapeHTML, the output is OK. My usage is:

$(document).ready(function () {
  var divs = $('div[name="blogEntry"]');
  divs.html(function (index, oldhtml) {
    return markdown.toHTML(oldhtml);
  });
});
evilstreak commented 11 years ago

I can't reproduce this. If you have a full example which demonstrates the problem please re-open this issue.