diff options
author | Waylan Limberg <waylan@gmail.com> | 2014-01-09 22:41:30 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2014-01-09 22:41:30 -0500 |
commit | f1cb6743891ffd3f38ca0bf6a0c94210e7730361 (patch) | |
tree | 678ee16a00f0ec40bbc7ff5969f722d3b8c9a149 /tests | |
parent | 88f75ee760bb92e51fc64c3805a73b8be896e641 (diff) | |
download | markdown-f1cb6743891ffd3f38ca0bf6a0c94210e7730361.tar.gz markdown-f1cb6743891ffd3f38ca0bf6a0c94210e7730361.tar.bz2 markdown-f1cb6743891ffd3f38ca0bf6a0c94210e7730361.zip |
Only escape ESCAPED_CHARS.
Leave all other chars prefaced by a backslash alone. Fixes #242.
Not sure why I thought that I needed to add another backslash.
Thanks for the report and the test case @mhubig.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/escaped_chars_in_js.html | 12 | ||||
-rw-r--r-- | tests/misc/escaped_chars_in_js.txt | 12 |
2 files changed, 24 insertions, 0 deletions
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> |