Index: src/java/com/opensymphony/util/TextUtils.java
===================================================================
RCS file: /cvs/oscore/src/java/com/opensymphony/util/TextUtils.java,v
retrieving revision 1.17
diff -u -r1.17 TextUtils.java
--- src/java/com/opensymphony/util/TextUtils.java	29 Jul 2005 04:53:20 -0000	1.17
+++ src/java/com/opensymphony/util/TextUtils.java	19 Aug 2005 03:51:05 -0000
@@ -703,7 +703,7 @@
 
                         //if we find these chars in an email, then it's part of a url, so lets leave it alone
                         //Are there any other chars we should abort email checking for??
-                        if ((c == '?') || (c == '&') || (c == '=')) {
+                        if ((c == '?') || (c == '&') || (c == '=') || (c == '/') || (c == '%')) {
                             lastEndIndex = atIndex + 1;
 
                             continue main;
Index: src/test/com/opensymphony/util/TextUtilsTest.java
===================================================================
RCS file: /cvs/oscore/src/test/com/opensymphony/util/TextUtilsTest.java,v
retrieving revision 1.6
diff -u -r1.6 TextUtilsTest.java
--- src/test/com/opensymphony/util/TextUtilsTest.java	12 Nov 2004 08:01:26 -0000	1.6
+++ src/test/com/opensymphony/util/TextUtilsTest.java	19 Aug 2005 03:51:05 -0000
@@ -150,8 +150,12 @@
 
         assertEquals("text <a href='mailto:admin@opensymphony.com'>admin@opensymphony.com</a>", TextUtils.linkEmail("text admin@opensymphony.com"));
 
+        // Don't escape emails that form part of URLs.  Eg. the URLs generated by mod_mbox
+        assertEquals("http://example.com/2005.mbox/foo@example.com%3e", TextUtils.linkEmail("http://example.com/2005.mbox/foo@example.com%3e"));
+        assertEquals("http://mail-archives.apache.org/mod_mbox/incubator-general/200507.mbox/%3c67912d02ca6b0465f38ad27796d0b0c7@gbiv.com%3e", TextUtils.linkEmail("http://mail-archives.apache.org/mod_mbox/incubator-general/200507.mbox/%3c67912d02ca6b0465f38ad27796d0b0c7@gbiv.com%3e"));
+
         //don't link emails inside URLs
-        //        assertEquals("text http://admin@opensymphony:abc.com", TextUtils.linkEmail("text http://admin@opensymphony:abc.com"));
+        assertEquals("text http://admin@opensymphony:abc.com", TextUtils.linkEmail("text http://admin@opensymphony:abc.com"));
     }
 
     public void testLinkURL() {
