ronghuaxiang / wmd

Automatically exported from code.google.com/p/wmd
0 stars 0 forks source link

Showdown cuts off reference-style links at 'Z' #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Markdown to reproduce the problem:

-------------

[URIs with Zs are cut off.][1]

  [1]: http://www.youtube.com/watch?v=7qh9AZVVDxw

--------------

The url-matching regular expression:

/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ 
\t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm

uses \Z, which is newline or end of subject for many regex engines, but literal 
'Z' in IE, Webkit, 
and Gecko. Removing "|\Z" from the expression resolves the issue.

Original issue reported on code.google.com by nic...@draftastic.com on 22 Aug 2008 at 8:44

GoogleCodeExporter commented 8 years ago
PS: thank you for WMD! We've added some filtering for XSS, and are putting it 
to good use at 
http://draftastic.com/.

Original comment by nic...@draftastic.com on 22 Aug 2008 at 8:56

GoogleCodeExporter commented 8 years ago
This has been fixed on the new version of WMD hosted on github
(http://github.com/derobins/wmd/tree/master).  Keep in mind that many of the WMD
options will be broken until v2.1 comes out in mid-Feb. 2009.

Original comment by Dana.E.R...@gmail.com on 3 Feb 2009 at 11:22

GoogleCodeExporter commented 8 years ago
This seems like a bug in webkit and IE, but since Microsoft won't fix it...

Original comment by tloew...@gmail.com on 24 Apr 2009 at 4:18