]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 659185: html_quote() escapes @ causing mailto links to not be processed
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 24 May 2011 06:46:43 +0000 (08:46 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 24 May 2011 06:46:43 +0000 (08:46 +0200)
r/a=mkanat

Bugzilla/Template.pm

index 612291cebb8c26a9dd8e069b2147c4155730a3f4..8a7f538bd04435a884c676f3d7e9d0c665eb3c9e 100644 (file)
@@ -229,7 +229,8 @@ sub quoteUrls {
 
     # mailto:
     # Use |<nothing> so that $1 is defined regardless
-    $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b
+    # &#64; is the encoded '@' character.
+    $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+&\#64;[\w\-]+(?:\.[\w\-]+)+)\b
               ~<a href=\"mailto:$2\">$1$2</a>~igx;
 
     # attachment links