Skip to content

Commit 53d7ba0

Browse files
authored
Merge pull request #1397 from mccraveiro/escape-tag
Fix tag escaping
2 parents fb334ba + e51bca6 commit 53d7ba0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/marked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ InlineLexer.prototype.output = function(src) {
691691
// escape
692692
if (cap = this.rules.escape.exec(src)) {
693693
src = src.substring(cap[0].length);
694-
out += cap[1];
694+
out += escape(cap[1]);
695695
continue;
696696
}
697697

test/new/escaped_angles.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p>></p>
1+
<p>&gt;</p>

test/original/backslash_escapes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<p>Right paren: )</p>
2222

23-
<p>Greater-than: ></p>
23+
<p>Greater-than: &gt;</p>
2424

2525
<p>Hash: #</p>
2626

test/specs/commonmark/commonmark-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe('CommonMark 0.28 Backslash escapes', function() {
293293
var section = 'Backslash escapes';
294294

295295
// var shouldPassButFails = [];
296-
var shouldPassButFails = [291, 300, 301];
296+
var shouldPassButFails = [300, 301];
297297

298298
var willNotBeAttemptedByCoreTeam = [];
299299

0 commit comments

Comments
 (0)