diff --git a/lib/markdown2.py b/lib/markdown2.py index 6d060859..634c0987 100755 --- a/lib/markdown2.py +++ b/lib/markdown2.py @@ -1235,7 +1235,7 @@ def _run_span_gamut(self, text): \s*/?> | # auto-link (e.g., ) - <\w+[^>]*> + <[\w~:/?#\[\]@!$&'\(\)*+,;%=\.\\-]+> | # comment | diff --git a/test/tm-cases/issue341_xss.html b/test/tm-cases/issue341_xss.html index 48aedff9..c51acb3d 100644 --- a/test/tm-cases/issue341_xss.html +++ b/test/tm-cases/issue341_xss.html @@ -2,4 +2,4 @@ [HTML_REMOVED]alert(1);//>[HTML_REMOVED]>

Example 2: -[HTML_REMOVED]alert(1);/*->a>a\\*/[HTML_REMOVED]alert(1);/*->a>

+<http://g[HTML_REMOVED]alert(1);/\*->a><http://ga\\*/[HTML_REMOVED]alert(1);/*->a>