Changeset 9238 for trunk/activesupport/lib/active_support/json.rb
- Timestamp:
- 04/08/08 03:45:26 (5 months ago)
- Files:
-
- trunk/activesupport/lib/active_support/json.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/lib/active_support/json.rb
r9203 r9238 1 require 'active_support/json/encoding' 2 require 'active_support/json/decoding' 1 3 2 4 3 module ActiveSupport 4 # If true, use ISO 8601 format for dates and times. Otherwise, fall back to the ActiveSupport legacy format. 5 5 mattr_accessor :use_standard_json_time_format 6 7 class << self 8 def escape_html_entities_in_json 9 @escape_html_entities_in_json 10 end 11 12 def escape_html_entities_in_json=(value) 13 ActiveSupport::JSON::Encoding.escape_regex = \ 14 if value 15 /[\010\f\n\r\t"\\><&]/ 16 else 17 /[\010\f\n\r\t"\\]/ 18 end 19 @escape_html_entities_in_json = value 20 end 21 end 6 22 7 23 module JSON … … 32 48 end 33 49 end 50 51 require 'active_support/json/encoding' 52 require 'active_support/json/decoding'