X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fjson.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fjson.rb;h=2bdb4a7b11189c1baa1ac4238991f303716c01aa;hb=437aa336c44c74a30aeea16a06743c32747ed661;hp=0000000000000000000000000000000000000000;hpb=97a0772b06264134cfe38e7494f9427efe0840a0;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/json.rb b/vendor/rails/activesupport/lib/active_support/json.rb new file mode 100644 index 0000000..2bdb4a7 --- /dev/null +++ b/vendor/rails/activesupport/lib/active_support/json.rb @@ -0,0 +1,23 @@ +module ActiveSupport + # If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format. + mattr_accessor :use_standard_json_time_format + + class << self + def escape_html_entities_in_json + @escape_html_entities_in_json + end + + def escape_html_entities_in_json=(value) + ActiveSupport::JSON::Encoding.escape_regex = \ + if value + /[\010\f\n\r\t"\\><&]/ + else + /[\010\f\n\r\t"\\]/ + end + @escape_html_entities_in_json = value + end + end +end + +require 'active_support/json/encoding' +require 'active_support/json/decoding'