|Using Erubis::EscapedEruby with Tilt||Geoff Buesing||3/8/10 1:34 PM|
I'm looking into using Tilt to render Erubis templates with Erubis'
auto-escaping feature (i.e., content within <%= %> is automatically
Unfortunately, you can't turn this on with an option to
One could always create a Tilt::EscapedErubisTemplate to achieve this,
Tilt::ErubisTemplate.new 'foo.erb', 1, :engine_class =>
Any interest in a patch for this?
|Re: Using Erubis::EscapedEruby with Tilt||Ryan Tomayko||3/8/10 1:42 PM|
I like reserving the options Hash for the underlying engine but this
:engine_class would work and allow people to write custom subclasses,
|Re: Using Erubis::EscapedEruby with Tilt||Geoff Buesing||3/8/10 2:54 PM|
Indeed, handy to have :engine_class as a hook point for custom Erubis
subclasses. One potentially interesting possibility with this would be
to set :engine_class to the Erubis subclass in ActionPack, for
compatibility with code that uses Rails' new html_safe method.
Re: :escaping => true, this would be a nice convenience for the most
|Re: Using Erubis::EscapedEruby with Tilt||Ryan Tomayko||3/8/10 3:03 PM|
On Mon, Mar 8, 2010 at 2:54 PM, Geoff Buesing <gbue...@gmail.com> wrote:
Yep. That's perfect.
|Re: Using Erubis::EscapedEruby with Tilt||Geoff Buesing||3/8/10 4:08 PM|
Code is here:
(I just sent a pull request as well.)
On Mar 8, 5:03 pm, Ryan Tomayko <rtoma...@gmail.com> wrote:
|Re: Using Erubis::EscapedEruby with Tilt||Ryan Tomayko||3/9/10 6:56 AM|
On Mon, Mar 8, 2010 at 4:08 PM, Geoff Buesing <gbue...@gmail.com> wrote:
Looks great. Applied.
|Re: Using Erubis::EscapedEruby with Tilt||Geoff Buesing||5/7/10 11:58 AM|
Just a follow-up on this feature: Erubis :escape_html => true option
works great with Sinatra 1.0 and the latest Tilt 0.9 gem, here's an
On Mar 9, 9:56 am, Ryan Tomayko <rtoma...@gmail.com> wrote:
> On Mon, Mar 8, 2010 at 4:08 PM, Geoff Buesing <gbues...@gmail.com> wrote:> >http://github.com/gbuesing/tilt/commit/c9bc18ad52a7ba280acaed34364714...