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

Fix for ampersands in markdown #1174

Merged
merged 1 commit into from May 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/markdown.js
Expand Up @@ -57,9 +57,9 @@ marked.setOptions({

function toHTML(text) {
const normalizedLeftPad = normalizePadding(text);
// As markdown is pulled from HTML, > is already escaped and
// As markdown is pulled from HTML, > and & are already escaped and
// so blockquotes aren't picked up by the parser. This fixes it.
const potentialMarkdown = normalizedLeftPad.replace(/>/gm, ">");
const potentialMarkdown = normalizedLeftPad.replace(/>/gm, ">").replace(/&/gm, "&");
const html = marked(potentialMarkdown);

return html;
Expand Down