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 tag escaping #1397

Merged
merged 1 commit into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ InlineLexer.prototype.output = function(src) {
// escape
if (cap = this.rules.escape.exec(src)) {
src = src.substring(cap[0].length);
out += cap[1];
out += escape(cap[1]);
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion test/new/escaped_angles.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>></p>
<p>&gt;</p>
2 changes: 1 addition & 1 deletion test/original/backslash_escapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<p>Right paren: )</p>

<p>Greater-than: ></p>
<p>Greater-than: &gt;</p>

<p>Hash: #</p>

Expand Down
2 changes: 1 addition & 1 deletion test/specs/commonmark/commonmark-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('CommonMark 0.28 Backslash escapes', function() {
var section = 'Backslash escapes';

// var shouldPassButFails = [];
var shouldPassButFails = [291, 300, 301];
var shouldPassButFails = [300, 301];

var willNotBeAttemptedByCoreTeam = [];

Expand Down