package mir.misc;
import freemarker.template.*;
+import mir.util.*;
+import mir.generator.*;
import mir.entity.Entity;
import mir.entity.EntityList;
import mir.storage.StorageObjectException;
// this conform to updated freemarker syntax
configHash.put("compressWhitespace", new freemarker.template.utility.CompressWhitespace());
+ SimpleHash utilityHash = new SimpleHash();
+ try {
+ utilityHash.put("compressWhitespace", new freemarker.template.utility.CompressWhitespace());
+ utilityHash.put("encodeURI", FreemarkerGenerator.makeAdapter(new GeneratorHTMLFunctions.encodeURIGeneratorFunction()));
+ utilityHash.put("encodeHTML", FreemarkerGenerator.makeAdapter(new GeneratorHTMLFunctions.encodeHTMLGeneratorFunction()));
+ }
+ catch (Throwable t) {
+ throw new HTMLParseException(t.getMessage());
+ }
+
+
SimpleHash outPutHash = new SimpleHash();
if (extra != null) {
}
outPutHash.put("data", tmr);
outPutHash.put("config", configHash);
+ outPutHash.put("utility", utilityHash);
MessageResources messages = MessageResources.getMessageResources(bundles);
outPutHash.put("lang", new MessageMethodModel(locale, messages));