class Marten::Template::Tag::Escape

Overview

The escape template tag.

The escape tag is used to enable or disable auto-escaping for a block of code. It takes one argument, either on or off, to enable or disable auto-escaping, respectively.

For example:

{% escape off %}
 <div>{{ article.html_body }}</div>
{% endescape %}

Defined in:

marten/template/tag/escape.cr

Constructors

Instance Method Summary

Instance methods inherited from class Marten::Template::Tag::Base

render(context : Context) : String render

Constructor methods inherited from class Marten::Template::Tag::Base

new(parser : Parser, source : String) new

Constructor Detail

def self.new(parser : Parser, source : String) #

[View source]

Instance Method Detail

def render(context : Context) : String #
Description copied from class Marten::Template::Tag::Base

Render the template tag for a given context.


[View source]