aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/PageTemplates.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-03-06 01:12:39 +0700
committerGravatar Ugnich Anton2012-03-06 01:12:39 +0700
commitb4a7601a14c9077fcfefc083ed39348409d57b76 (patch)
tree956047a7b6d7be1069814db848278b1ddc0c9dfd /src/java/com/juick/http/www/PageTemplates.java
parentfaf709b4141f52cdd04a02edad31bf62a32af824 (diff)
User tags, friends, readers
Diffstat (limited to 'src/java/com/juick/http/www/PageTemplates.java')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 90246e76..a07d5ed8 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -183,8 +183,8 @@ public class PageTemplates {
out.println("<div id=\"title\"><div id=\"title-container\">");
out.println(" <div id=\"title-av\"><a href=\"/" + user.UName + "/\"><img src=\"http://i.juick.com/a/" + user.UID + ".png\" width=\"96\" height=\"96\" alt=\"" + user.UName + "\"/></a></div>");
out.println(" <div id=\"title-stats\"><ul>");
- out.println(" <li>" + rb.getString("(Stats) I read") + ": " + iread + "</li>");
- out.println(" <li>" + rb.getString("(Stats) My readers") + ": " + myreaders + "</li>");
+ out.println(" <li><a href=\"/" + user.UName + "/friends\">" + rb.getString("(Stats) I read") + ": " + iread + "</a></li>");
+ out.println(" <li><a href=\"/" + user.UName + "/readers\">" + rb.getString("(Stats) My readers") + ": " + myreaders + "</a></li>");
out.println(" <li>" + rb.getString("(Stats) Messages") + ": " + messages + "</li>");
out.println(" <li>" + rb.getString("(Stats) Replies") + ": " + replies + "</li>");
out.println(" </ul></div>");
@@ -295,14 +295,14 @@ public class PageTemplates {
Matcher m = regexLinks2.matcher(msg);
StringBuffer sb = new StringBuffer();
while (m.find()) {
- String url = m.group(3).replace(" ", "%20").replaceAll("\\s", "");
+ String url = m.group(3).replace(" ", "%20").replaceAll("\\s+", "");
m.appendReplacement(sb, "$1$2<a href=\"" + url + "\" rel=\"nofollow\">$4</a>$5");
}
m.appendTail(sb);
msg = sb.toString();
// > citate
- msg = msg.replaceAll("(?:(?<=\\n)|(?<=\\A))&gt;\\s*(.*)(\\n|(?=\\Z))", "<blockquote>$1</blockquote>");
+ msg = msg.replaceAll("(?:(?<=\\n)|(?<=\\A))&gt; *(.*)?(\\n|(?=\\Z))", "<blockquote>$1</blockquote>");
msg = msg.replaceAll("</blockquote><blockquote>", "\n");
msg = msg.replaceAll("\n", "<br/>\n");