Skip to content

Commit 49e87b7

Browse files
dominykasTrySound
authored andcommitted
1 parent 232a554 commit 49e87b7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/helpers/parse_link_destination.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ module.exports = function parseLinkDestination(state, pos) {
5252

5353
if (code === 0x20) { break; }
5454

55-
if (code > 0x08 && code < 0x0e) { break; }
55+
// ascii control chars
56+
if (code < 0x20 || code === 0x7F) { break; }
5657

5758
if (code === 0x5C /* \ */ && pos + 1 < max) {
5859
pos += 2;

test/fixtures/remarkable/xss.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ javascript:alert(1)
7777
<p>javascript:alert(1)</p>
7878
<p>javascript:alert(1)</p>
7979
.
80+
81+
82+
.
83+
[ASCII control characters XSS](javascript:alert(1))
84+
.
85+
<p>[ASCII control characters XSS](javascript:alert(1))</p>
86+
.

0 commit comments

Comments
 (0)