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"),
|
||||
"ui_modules": {"Entry": EntryModule},
|
||||
"xsrf_cookies": True,
|
||||
"autoescape": None,
|
||||
}
|
||||
application = tornado.wsgi.WSGIApplication([
|
||||
(r"/", HomeHandler),
|
||||
|
|
|
@ -53,6 +53,7 @@ class Application(tornado.web.Application):
|
|||
xsrf_cookies=True,
|
||||
cookie_secret="11oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
|
||||
login_url="/auth/login",
|
||||
autoescape=None,
|
||||
)
|
||||
tornado.web.Application.__init__(self, handlers, **settings)
|
||||
|
||||
|
|
|
@ -46,8 +46,9 @@ class Application(tornado.web.Application):
|
|||
xsrf_cookies=True,
|
||||
facebook_api_key=options.facebook_api_key,
|
||||
facebook_secret=options.facebook_secret,
|
||||
ui_modules= {"Post": PostModule},
|
||||
ui_modules={"Post": PostModule},
|
||||
debug=True,
|
||||
autoescape=None,
|
||||
)
|
||||
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"),
|
||||
static_path=os.path.join(os.path.dirname(__file__), "static"),
|
||||
xsrf_cookies=True,
|
||||
autoescape=None,
|
||||
)
|
||||
tornado.web.Application.__init__(self, handlers, **settings)
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ import re
|
|||
from tornado import escape
|
||||
from tornado.util import bytes_type
|
||||
|
||||
_DEFAULT_AUTOESCAPE = None
|
||||
_DEFAULT_AUTOESCAPE = "xhtml_escape"
|
||||
_UNSET = object()
|
||||
|
||||
class Template(object):
|
||||
|
|
Loading…
Reference in New Issue