3 ms·
The Closure Templates project is much more interesting IMO. http://code.google.com/closure/templates/ http://code.google.com/closure/templates/ They can be us
by benatkin 15y ago
The Closure Templates project is much more interesting IMO.
http://code.google.com/closure/templates/ http://code.google.com/closure/templates/
They can be used server-side on the JVM, or client-side (compiled on the server side). They're pretty fast.
I wish template engines would have URL sanitization functions built into them (that remove javascript: and other URI schemes). I thought Closure Templates might have when I saw escapeUri, but it doesn't. (The similar-sounding esc_url in WordPress does remove javascript: and other problematic URI schemes.) User-submitted URLs should be sanitized, but it wouldn't hurt to have another layer of security when they are, and it would help when they aren't. I blogged about this: http://benatkin.com/2011/09/16/safe-html-from-a-template/ http://benatkin.com/2011/09/16/safe-html-from-a-template/
- js4all 15y agoClosure Templates was also my first thought. I like them a lot and have combined them server-side with AppJet, which also runs on the JVM. A perfect match in my opinion. I have written a blog post about this: http://blog.jgate.de/closure-templates-for-appjet http://blog.jgate.de/closure-templates-for-appjet