voodoodyne / subetha

SubEtha Mail is a J2EE-based mailing list manager
Other
13 stars 6 forks source link

Linkify text in archives #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
i would love to see a URI in the archives and be able to click on it with
target="_new"

jon
------- Additional comments from Jason Pyeron Sun Jan 11 04:39:08 -0700 2009 
-------

Here I thought I could be lazy...

org.apache.jasper.JasperException: /archive_msg.jsp(86,75) Scripting elements ( 
<%!, <jsp:declaration, <%=, <jsp:expression, <%, 
<jsp:scriptlet ) are disallowed here. 

Doh!

I guess I will have to make this a tag now...

<pre class="message" ><c:set var="linkify" value="${part.contents}"/><%

{
 StringBuffer linkedoutput= new StringBuffer();
 String urlregexp="[a-zA-Z]+://(?:[\\w]+\\.)*[\\w]+(?::[0-9]+)?(?:/\\S*)?";
 Matcher m=Pattern.compile("(?:("+urlregexp+")|.+?)").matcher
(pageContext.getAttribute("linkify"));
 while (m.find())
 {
  String res=m.group();
  if (res.matches(urlregexp)) res="<a href='"+res+"'>"+res+"</a>";
  linkedoutput.append(res);
 }
 pageContext.setAttribute("linkify",linkedoutput.toString());
}

%><c:out value="${linkify}"/></pre>
------- Additional comments from Jason Pyeron Sun Jan 11 04:41:14 -0700 2009 
-------

adding cc
------- Additional comments from Jason Pyeron Sun Jan 11 13:51:16 -0700 2009 
-------

Created an attachment (id=3)
patch and new files in tgz
------- Additional comments from Jason Pyeron Sun Jan 11 13:53:52 -0700 2009 
-------

oh Yeah!

I know it is messy, but I could clean it up latter, for now it works.

could I get permission to work in a branch/tag in the svn repo?

I would like to track head and 1.0.2 with some patches.

Original issue reported on code.google.com by lhori...@gmail.com on 4 Jun 2009 at 10:23

Attachments:

GoogleCodeExporter commented 9 years ago
This is important to OpenSCG...

Original comment by lussm...@gmail.com on 30 Dec 2010 at 4:22