again documentation updates fixed another python 2.4 bug. Imports are not evaluated with the template context any longer which makes it possible to keep them in memory
--HG--
branch : trunk
diff --git a/jinja2/nodes.py b/jinja2/nodes.py
index c1231ea..b3255d5 100644
--- a/jinja2/nodes.py
+++ b/jinja2/nodes.py
@@ -17,6 +17,7 @@
from itertools import chain, izip
from collections import deque
from copy import copy
+from jinja2.utils import Markup
_binop_to_func = {
@@ -349,6 +350,14 @@
return self.name not in ('true', 'false', 'none')
+class MarkSafe(Expr):
+ """Mark the wrapped expression as safe (Markup)"""
+ fields = ('expr',)
+
+ def as_const(self):
+ return Markup(self.expr.as_const())
+
+
class Literal(Expr):
"""Baseclass for literals."""