From 14d630b8682c425880511a2c5ddf520198f55205 Mon Sep 17 00:00:00 2001
From: Fabrice Bacchella <fbacchella@spamcop.net>
Date: Sat, 23 May 2015 15:59:28 -0400
Subject: [PATCH] Create web.rewriteSession key for use with tomcat  and CAS

---
 src/main/java/com/gitblit/wicket/pages/BlobPage.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gitblit/wicket/pages/BlobPage.java b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
index 3c244f9..1ef8f22 100644
--- a/src/main/java/com/gitblit/wicket/pages/BlobPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
@@ -137,6 +137,7 @@
 						table = missingBlob(blobPath, commit);
 					} else {
 						table = generateSourceView(source, extension, type == 1);
+						addBottomScriptInline("jQuery(prettyPrint);");
 					}
 					add(new Label("blobText", table).setEscapeModelStrings(false));
 					add(new Image("blobImage").setVisible(false));
@@ -150,6 +151,7 @@
 					table = missingBlob(blobPath, commit);
 				} else {
 					table = generateSourceView(source, null, false);
+					addBottomScriptInline("jQuery(prettyPrint);");
 				}
 				add(new Label("blobText", table).setEscapeModelStrings(false));
 				add(new Image("blobImage").setVisible(false));
@@ -193,7 +195,8 @@
 		} else {
 			sb.append("<pre class=\"plainprint\">");
 		}
-		lines = StringUtils.escapeForHtml(source, true).split("\n");
+		final int tabLength = app().settings().getInteger(Keys.web.tabLength, 4);
+		lines = StringUtils.escapeForHtml(source, true, tabLength).split("\n");
 
 		sb.append("<table width=\"100%\"><tbody>");
 

--
Gitblit v1.9.1