From 7e1af5e60a30c766c2bf132e8a7d577673d514ea Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 4 Apr 2006 01:16:05 +0000 Subject: [PATCH] Continue to fix bug with '<' around reference-style links --- modules/markdown.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/markdown.pl b/modules/markdown.pl index 72f6370a..81d4e6b7 100644 --- a/modules/markdown.pl +++ b/modules/markdown.pl @@ -28,7 +28,7 @@ # MultiMarkdown -$ModulesDescription .= '

$Id: markdown.pl,v 1.32 2006/04/01 00:52:15 fletcherpenney Exp $

'; +$ModulesDescription .= '

$Id: markdown.pl,v 1.33 2006/04/04 01:16:05 fletcherpenney Exp $

'; use vars qw!%MarkdownRuleOrder @MyMarkdownRules $MarkdownEnabled!; @@ -73,7 +73,9 @@ sub MarkdownRule { *Markdown::_RunSpanGamut = *NewRunSpanGamut; *Markdown::_DoHeaders = *NewDoHeaders; *Markdown::_EncodeCode = *NewEncodeCode; - *Markdown::_DoAutoLinks = *NewDoAutoLinks; + + # removed for '<' vs '<' issues + #*Markdown::_DoAutoLinks = *NewDoAutoLinks; # UnquoteHtml - undo what Oddmuse does $source = UnquoteHtml($source); @@ -118,7 +120,7 @@ sub SanitizeSource { # (in other words, this is not a bug) # But we do want to allow the use of '<' around links in Markdown - $text =~ s/\<(?!http:)/</g; + $text =~ s/\<(?!(https?|ftp|mailto):)/</g; return $text; } @@ -390,7 +392,7 @@ sub AntiSpam { sub NewDoAutoLinks { my $text = shift; - $text =~ s{<((https?|ftp):[^'">\s]+)>}{$1}gi; + $text =~ s{\<((https?|ftp):[^'">\s]+)>}{$1}gi; # Email addresses: $text =~ s{