]> 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:48:33 +0000 (08:48 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 24 May 2011 06:48:33 +0000 (08:48 +0200)
r/a=mkanat

Bugzilla/Template.pm

index a287b8ac9512283d63efc9372fd2840e5bde6d75..f58128eec0e83e70fe47e1bbd0f64e1ffca209b1 100644 (file)
@@ -222,7 +222,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