Sha256: 9b2ff59c008977adfd9973861be3a2038ec7155e840e261b7ea09e01071ce907

Contents?: true

Size: 444 Bytes

Versions: 47

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

require "abstract_unit"

class OutputEscapingTest < ActiveSupport::TestCase
  test "escape_html shouldn't die when passed nil" do
    assert_predicate ERB::Util.h(nil), :blank?
  end

  test "escapeHTML should escape strings" do
    assert_equal "&lt;&gt;&quot;", ERB::Util.h("<>\"")
  end

  test "escapeHTML shouldn't touch explicitly safe strings" do
    assert_equal "<", ERB::Util.h("<".html_safe)
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
jets-1.9.7 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.6 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.5 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.4 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.3 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.2 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.1 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.9.0 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.14 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.13 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.12 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.11 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.10 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.9 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.8 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.7 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.6 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.5 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.4 vendor/rails/actionpack/test/controller/output_escaping_test.rb
jets-1.8.3 vendor/rails/actionpack/test/controller/output_escaping_test.rb