Skip to content

Commit

Permalink
Allow nested parentheses in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Turner committed Jun 21, 2013
1 parent e444efd commit aa4ac33
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/markdown2.py
Expand Up @@ -1005,9 +1005,9 @@ def _sanitize_html(self, s):
\( # literal paren
[ \t]*
(?P<url> # \1
<.*?>
<[^ \t'"]*>
|
.*?
[^ \t'"]*
)
[ \t]*
( # \2
Expand Down
5 changes: 5 additions & 0 deletions test/markdowntest-cases/Parens in urls.html
@@ -0,0 +1,5 @@
<p><a href="/ur(inparen)l/">link text</a></p>

<p><a href="/ur(inparen)l/" title="title">link text</a></p>

<p><a href="/ur(inparen)l/" title="title">link text</a></p>
5 changes: 5 additions & 0 deletions test/markdowntest-cases/Parens in urls.text
@@ -0,0 +1,5 @@
[link text](/ur(inparen)l/)

[link text](/ur(inparen)l/ "title")

[link text](/ur(inparen)l/ 'title')

0 comments on commit aa4ac33

Please sign in to comment.