Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a read-only method which plugin authors can use to determine if x…

…ss 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.
  • Loading branch information...
commit cc1ad46eadfad2c617d897927eb4bc0c36e1d033 1 parent 4484f0b
@NZKoz NZKoz authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_view/base.rb
View
5 actionpack/lib/action_view/base.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.