# 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