From 86bea9e0016b2890db8ba83049dd4e89653a0a5e Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 16 Mar 2012 17:29:39 -0400
Subject: [PATCH] Ensure that the welcome message is interpreted as UTF-8 (issue 74)

---
 src/com/gitblit/wicket/panels/BasePanel.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/com/gitblit/wicket/panels/BasePanel.java
index 8ea2a69..3606dd0 100644
--- a/src/com/gitblit/wicket/panels/BasePanel.java
+++ b/src/com/gitblit/wicket/panels/BasePanel.java
@@ -38,7 +38,7 @@
 
 	protected TimeZone getTimeZone() {
 		return GitBlit.getBoolean(Keys.web.useClientTimezone, false) ? GitBlitWebSession.get()
-				.getTimezone() : TimeZone.getDefault();
+				.getTimezone() : GitBlit.getTimezone();
 	}
 
 	protected void setPersonSearchTooltip(Component component, String value, Constants.SearchType searchType) {
@@ -72,17 +72,16 @@
 
 		private static final long serialVersionUID = 1L;
 
-		public JavascriptTextPrompt(String event, String msg) {
+		private String initialValue = "";
+		
+		public JavascriptTextPrompt(String event, String msg, String value) {
 			super(event, true, new Model<String>(msg));
+			initialValue = value;
 		}
 
 		protected String newValue(final String currentValue, final String message) {
 			String result = "var userText = prompt('" + message + "','"
-					+ (currentValue == null ? "" : currentValue) + "'); " + "return userText; ";
-			// String result = prefix;
-			// if (currentValue != null) {
-			// result = prefix + currentValue;
-			// }
+					+ (initialValue == null ? "" : initialValue) + "'); " + "return userText; ";
 			return result;
 		}
 	}

--
Gitblit v1.9.1