提交 cc1ad46e 编写于 作者: M Michael Koziarski

Add a read-only method which plugin authors can use to determine if xss escaping.

This doesn't provide a way to turn off the escaping, but alternative template engine authors
can figure out what their default should be by calling this.  Avoids a messy version + plugin check.
上级 4484f0bc
......@@ -203,6 +203,11 @@ class << self
@@cache_template_loading = nil
cattr_accessor :cache_template_loading
# :nodoc:
def self.xss_safe?
true
end
def self.cache_template_loading?
ActionController::Base.allow_concurrency || (cache_template_loading.nil? ? !ActiveSupport::Dependencies.load? : cache_template_loading)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册