Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

the two escape implementations work the same now, updated jinja2-debu…

…g to load the i18n extension

--HG--
branch : trunk
  • Loading branch information...
commit 9d42abf3203303d7c512ac1f6d1e37f57c5681b2 1 parent 08a6a3b
@mitsuhiko authored
View
2  jinja2-debug.py
@@ -13,7 +13,7 @@
import jinja2
from werkzeug import script
-env = jinja2.Environment()
+env = jinja2.Environment(extensions=['jinja2.ext.i18n'])
def shell_init_func():
def _compile(x):
View
2  jinja2/compiler.py
@@ -712,7 +712,7 @@ def visit_Extends(self, node, frame):
raise CompilerExit()
self.outdent()
- self.writeline('parent_template = environment.get_template(', node, 1)
+ self.writeline('parent_template = environment.get_template(', node)
self.visit(node.template, frame)
self.write(', %r)' % self.name)
self.writeline('for name, parent_block in parent_template.'
View
9 jinja2/ext.py
@@ -35,11 +35,10 @@ def __new__(cls, name, bases, d):
class Extension(object):
"""Extensions can be used to add extra functionality to the Jinja template
- system at the parser level. This is a supported but currently
- undocumented interface. Custom extensions are bound to an environment but
- may not store environment specific data on `self`. The reason for this is
- that an extension can be bound to another environment (for overlays) by
- creating a copy and reassigning the `environment` attribute.
+ system at the parser level. Custom extensions are bound to an environment
+ but may not store environment specific data on `self`. The reason for
+ this is that an extension can be bound to another environment (for
+ overlays) by creating a copy and reassigning the `environment` attribute.
As extensions are created by the environment they cannot accept any
arguments for configuration. One may want to work around that by using
View
2  jinja2/utils.py
@@ -497,7 +497,7 @@ def escape(s):
.replace('>', '>')
.replace('<', '&lt;')
.replace("'", '&#39;')
- .replace('"', '&quot;')
+ .replace('"', '&#34;')
)
def soft_unicode(s):
Please sign in to comment.
Something went wrong with that request. Please try again.