Sha256: 278e50c1681a26623bd9c0e915f93c73a806e31fb89e3568044b0e994549c3cb

Contents?: true

Size: 251 Bytes

Versions: 3

Compression:

Stored size: 251 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe AutoHtml::HtmlEscape do
  it 'escapes html tags' do
    result = subject.call('<script>alert(0)</script>')
    expect(result).to eq '&lt;script&gt;alert(0)&lt;/script&gt;'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
auto_html-2.1.1 spec/auto_html/html_escape_spec.rb
auto_html-2.1.0 spec/auto_html/html_escape_spec.rb
auto_html-2.0.2 spec/auto_html/html_escape_spec.rb