# encoding: utf-8 require_relative 'common' describe 'Parser' do make_my_diffs_pretty! parallelize_me! it 'should translate valid entities into characters' do _(Sanitize.fragment("'é&")).must_equal("'é&") end it 'should translate orphaned ampersands into entities' do _(Sanitize.fragment('at&t')).must_equal('at&t') end it 'should not add newlines after tags when serializing a fragment' do _(Sanitize.fragment("
foo\n\n

bar

\nbaz
quux
", :elements => ['div', 'p'])) .must_equal "
foo\n\n

bar

\nbaz
quux
" end it 'should not have the Nokogiri 1.4.2+ unterminated script/style element bug' do _(Sanitize.fragment('foo