Subversion Repositories SmartDukaan

Rev

Rev 37477 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37477 Rev 37489
Line 241... Line 241...
241
 
241
 
242
    public static String getIconUrl(int entityId, String host, int port, String webapp) {
242
    public static String getIconUrl(int entityId, String host, int port, String webapp) {
243
        return "";
243
        return "";
244
    }
244
    }
245
 
245
 
-
 
246
    // Velocity-only helpers: the sole callers are .vm templates via $vmUtils
-
 
247
    // (AppConfig binds new Utils()), so no Java call site references them.
-
 
248
    public String html(String string) {
-
 
249
        return org.apache.commons.lang.StringEscapeUtils.escapeHtml(String.valueOf(string));
-
 
250
    }
-
 
251
 
-
 
252
    public String htmlJson(Object object) {
-
 
253
        return StringEscapeUtils.escapeHtml4(gson.toJson(object));
-
 
254
    }
-
 
255
 
246
    public static String getHyphenatedString(String s) {
256
    public static String getHyphenatedString(String s) {
247
        s = s.trim().replaceAll("\\s+", " ");
257
        s = s.trim().replaceAll("\\s+", " ");
248
        s = s.replaceAll("\\s", "-");
258
        s = s.replaceAll("\\s", "-");
249
        return s.toLowerCase();
259
        return s.toLowerCase();
250
    }
260
    }