Example #1
0
 public String __safe(Object val) {
     if (val instanceof RawData) {
         return ((RawData) val).data;
     }
     if (!template.name.endsWith(".html") || TagContext.hasParentTag("verbatim")) {
         return val.toString();
     }
     return HTML.htmlEscape(val.toString());
 }
Example #2
0
 public static void at(String location, String name, String address) {
   if (location != null
       && name != null
       && address != null
       && !location.equals("")
       && !name.equals("")
       && !address.equals("")) {
     new Post(
             user(),
             new Date().toString(),
             HTML.htmlEscape("Checked in at: " + name + "\n" + address))
         .save();
     Application.news(null);
   } else {
     redirect("/checkin");
   }
 }