BACKWARDS-INCOMPATIBLE: turn on template autoescaping by default.
Disable autoescaping in demos that don't already use it.
This commit is contained in:
parent
342c65663d
commit
26feb663aa
|
@ -151,6 +151,7 @@ settings = {
|
||||||
"template_path": os.path.join(os.path.dirname(__file__), "templates"),
|
"template_path": os.path.join(os.path.dirname(__file__), "templates"),
|
||||||
"ui_modules": {"Entry": EntryModule},
|
"ui_modules": {"Entry": EntryModule},
|
||||||
"xsrf_cookies": True,
|
"xsrf_cookies": True,
|
||||||
|
"autoescape": None,
|
||||||
}
|
}
|
||||||
application = tornado.wsgi.WSGIApplication([
|
application = tornado.wsgi.WSGIApplication([
|
||||||
(r"/", HomeHandler),
|
(r"/", HomeHandler),
|
||||||
|
|
|
@ -53,6 +53,7 @@ class Application(tornado.web.Application):
|
||||||
xsrf_cookies=True,
|
xsrf_cookies=True,
|
||||||
cookie_secret="11oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
|
cookie_secret="11oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
|
||||||
login_url="/auth/login",
|
login_url="/auth/login",
|
||||||
|
autoescape=None,
|
||||||
)
|
)
|
||||||
tornado.web.Application.__init__(self, handlers, **settings)
|
tornado.web.Application.__init__(self, handlers, **settings)
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ class Application(tornado.web.Application):
|
||||||
facebook_secret=options.facebook_secret,
|
facebook_secret=options.facebook_secret,
|
||||||
ui_modules={"Post": PostModule},
|
ui_modules={"Post": PostModule},
|
||||||
debug=True,
|
debug=True,
|
||||||
|
autoescape=None,
|
||||||
)
|
)
|
||||||
tornado.web.Application.__init__(self, handlers, **settings)
|
tornado.web.Application.__init__(self, handlers, **settings)
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ class Application(tornado.web.Application):
|
||||||
template_path=os.path.join(os.path.dirname(__file__), "templates"),
|
template_path=os.path.join(os.path.dirname(__file__), "templates"),
|
||||||
static_path=os.path.join(os.path.dirname(__file__), "static"),
|
static_path=os.path.join(os.path.dirname(__file__), "static"),
|
||||||
xsrf_cookies=True,
|
xsrf_cookies=True,
|
||||||
|
autoescape=None,
|
||||||
)
|
)
|
||||||
tornado.web.Application.__init__(self, handlers, **settings)
|
tornado.web.Application.__init__(self, handlers, **settings)
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ import re
|
||||||
from tornado import escape
|
from tornado import escape
|
||||||
from tornado.util import bytes_type
|
from tornado.util import bytes_type
|
||||||
|
|
||||||
_DEFAULT_AUTOESCAPE = None
|
_DEFAULT_AUTOESCAPE = "xhtml_escape"
|
||||||
_UNSET = object()
|
_UNSET = object()
|
||||||
|
|
||||||
class Template(object):
|
class Template(object):
|
||||||
|
|
Loading…
Reference in New Issue