Make title more robust
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 14 Aug 2015 16:05:54 +0000 (16:05 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 14 Aug 2015 16:05:54 +0000 (16:05 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@8322 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.cms/src/org/argeo/cms/util/SimpleApp.java

index be764e975b10ca8bb9f978ae6b2e715e15ba9079..c43ddd7864c1cfa16b1f1459dfb86f70417f1a1b 100644 (file)
@@ -97,11 +97,13 @@ public class SimpleApp implements CmsConstants, ApplicationConfiguration,
                                }
 
                                // page title
-                               if (!properties.containsKey(WebClient.PAGE_TITLE))
-                                       properties.put(
-                                                       WebClient.PAGE_TITLE,
-                                                       Character.toUpperCase(page.charAt(0))
-                                                                       + page.substring(1));
+                               if (!properties.containsKey(WebClient.PAGE_TITLE)) {
+                                       if (page.length() > 0)
+                                               properties.put(
+                                                               WebClient.PAGE_TITLE,
+                                                               Character.toUpperCase(page.charAt(0))
+                                                                               + page.substring(1));
+                               }
 
                                // default body HTML
                                if (!properties.containsKey(WebClient.BODY_HTML))