diff options
-rw-r--r-- | markdown/inlinepatterns.py | 2 | ||||
-rw-r--r-- | tests/misc/escaped_chars_in_js.html | 12 | ||||
-rw-r--r-- | tests/misc/escaped_chars_in_js.txt | 12 |
3 files changed, 25 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index bd3d17b..c0bd3d1 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -231,7 +231,7 @@ class EscapePattern(Pattern): if char in self.markdown.ESCAPED_CHARS: return '%s%s%s' % (util.STX, ord(char), util.ETX) else: - return '\\%s' % char + return None class SimpleTagPattern(Pattern): diff --git a/tests/misc/escaped_chars_in_js.html b/tests/misc/escaped_chars_in_js.html new file mode 100644 index 0000000..b821fb1 --- /dev/null +++ b/tests/misc/escaped_chars_in_js.html @@ -0,0 +1,12 @@ +<p><span id="e116142240">[javascript protected email address]</span> +<script type="text/javascript"> + var a="gqMjyw7lZCaKk6p0J3uAUYS1.dbIW2hXzDHmiVNotOPRe_Ev@c4Gs58+LBr-F9QTfxn"; + var b=a.split("").sort().join(""); + var c="F_-F6F_-FMe_"; + var d=""; + for(var e=0;e<c.length;e++) + d+=b.charAt(a.indexOf(c.charAt(e))); + document + .getElementById("e116142240") + .innerHTML="<a href=\"mailto:"+d+"\">"+d+"</a>"; +</script></p>
\ No newline at end of file diff --git a/tests/misc/escaped_chars_in_js.txt b/tests/misc/escaped_chars_in_js.txt new file mode 100644 index 0000000..ca917c8 --- /dev/null +++ b/tests/misc/escaped_chars_in_js.txt @@ -0,0 +1,12 @@ +<span id="e116142240">[javascript protected email address]</span> +<script type="text/javascript"> + var a="gqMjyw7lZCaKk6p0J3uAUYS1.dbIW2hXzDHmiVNotOPRe_Ev@c4Gs58+LBr-F9QTfxn"; + var b=a.split("").sort().join(""); + var c="F_-F6F_-FMe_"; + var d=""; + for(var e=0;e<c.length;e++) + d+=b.charAt(a.indexOf(c.charAt(e))); + document + .getElementById("e116142240") + .innerHTML="<a href=\"mailto:"+d+"\">"+d+"</a>"; +</script> |