forked from markedjs/marked
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request markedjs#977 from KostyaTretyak/parser-fix
Parser fix
- Loading branch information
Showing
4 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
<p>Link: <a href="http://example.com/">http://example.com/</a>.</p> | ||
|
||
<p>With an ampersand: <a href="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</a></p> | ||
<p>With an ampersand: <a href="http://example1.com/?foo=1&bar=2">http://example1.com/?foo=1&bar=2</a></p> | ||
|
||
<ul> | ||
<li>In a list?</li> | ||
<li><a href="http://example.com/">http://example.com/</a></li> | ||
<li><a href="http://example2.com/">http://example2.com/</a></li> | ||
<li>It should.</li> | ||
</ul> | ||
|
||
<blockquote> | ||
<p>Blockquoted: <a href="http://example.com/">http://example.com/</a></p> | ||
<p>Blockquoted: <a href="http://example3.com/">http://example3.com/</a></p> | ||
</blockquote> | ||
|
||
<p>Auto-links should not occur here: <code><http://example.com/></code></p> | ||
<p>Auto-links should not occur here: <code><http://example4.com/></code></p> | ||
|
||
<pre><code>or here: <http://example.com/> | ||
<pre><code>or here: <http://example5.com/> | ||
</code></pre> | ||
|
||
<p>Open angle bracket with link:</p> | ||
|
||
<p><<a href="http://example6.com">http://example6.com</a></p> | ||
|
||
<p>With space: < <a href="http://example7.com">http://example7.com</a></p> | ||
|
||
<p>With content: <1 <a href="http://example8.com">http://example8.com</a></p> | ||
|
||
<p>hello world | ||
<a href="http://example9.com">http://example9.com</a> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
Link: <http://example.com/>. | ||
|
||
With an ampersand: <http://example.com/?foo=1&bar=2> | ||
With an ampersand: <http://example1.com/?foo=1&bar=2> | ||
|
||
* In a list? | ||
* <http://example.com/> | ||
* <http://example2.com/> | ||
* It should. | ||
|
||
> Blockquoted: <http://example.com/> | ||
> Blockquoted: <http://example3.com/> | ||
|
||
Auto-links should not occur here: `<http://example.com/>` | ||
Auto-links should not occur here: `<http://example4.com/>` | ||
|
||
or here: <http://example.com/> | ||
or here: <http://example5.com/> | ||
|
||
Open angle bracket with link: | ||
|
||
<<http://example6.com> | ||
|
||
With space: < <http://example7.com> | ||
|
||
With content: <1 <http://example8.com> | ||
|
||
hello world | ||
<http://example9.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<p><a href="mailto:<svg/onload="alert(1)"//@x"><svg/onload="alert(1)"//@x</a></p> | ||
<p><<a href="mailto:svg/onload="alert(1)"//@x">svg/onload="alert(1)"//@x</a></p> | ||
|
||
<p><a href="mailto:bar"onclick="alert('XSS')"@foo">bar"onclick="alert('XSS')"@foo</a></p> |