|
|
@ -21,8 +21,9 @@ module Bristlecode
|
|
|
|
expect(to_html('&')).to eq('&')
|
|
|
|
expect(to_html('&')).to eq('&')
|
|
|
|
expect(to_html('>')).to eq('>')
|
|
|
|
expect(to_html('>')).to eq('>')
|
|
|
|
expect(to_html('<')).to eq('<')
|
|
|
|
expect(to_html('<')).to eq('<')
|
|
|
|
expect(to_html("'")).to eq(''')
|
|
|
|
expect(to_html("'")).to eq(''')
|
|
|
|
expect(to_html('"')).to eq('"')
|
|
|
|
expect(to_html('"')).to eq('"')
|
|
|
|
|
|
|
|
expect(to_html('/')).to eq('/')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'handles plain text just fine' do
|
|
|
|
it 'handles plain text just fine' do
|
|
|
@ -66,7 +67,7 @@ module Bristlecode
|
|
|
|
|
|
|
|
|
|
|
|
it 'passes simple url contents opaquely' do
|
|
|
|
it 'passes simple url contents opaquely' do
|
|
|
|
input = '[url]x[b]y[/b]z[/url]'
|
|
|
|
input = '[url]x[b]y[/b]z[/url]'
|
|
|
|
output = '<a href="x[b]y[/b]z">x[b]y[/b]z</a>'
|
|
|
|
output = '<a href="x[b]y[/b]z">x[b]y[/b]z</a>'
|
|
|
|
expect(to_html(input)).to eq(output)
|
|
|
|
expect(to_html(input)).to eq(output)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|