How to detect context in Views
<p>I have simple template system for my View, something like:</p>

<pre><code>&lt;h2&gt;%var1%&lt;/h2&gt;
</code></pre>

<p>And when I want escape variable i use filter:</p>

<pre><code>&lt;h2&gt;%var1|html%&lt;/h2&gt;
</code></pre>

<p>But I want to write "system" to detect context of current variable. System will return html, xml, css or other depending on current context and variable will be correctly escaped.</p>

<p>Can you help me where can I start?
Thank you!</p>
