Skip to content

Commit

Permalink
Added test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmotyczynska committed Oct 24, 2023
1 parent 5f56f94 commit 93805cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ckeditor5-clipboard/tests/utils/plaintexttohtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ describe( 'plainTextToHtml()', () => {
expect( plainTextToHtml( 'x y <z>' ) ).to.equal( 'x y &lt;z&gt;' );
} );

it( 'encodes &', () => {
expect( plainTextToHtml( 'x=1&y=2&z=3' ) ).to.equal( 'x=1&amp;y=2&amp;z=3' );
} );

it( 'turns double line breaks into paragraphs (Linux/Mac EOL style)', () => {
expect( plainTextToHtml( 'x\n\ny\n\nz' ) ).to.equal( '<p>x</p><p>y</p><p>z</p>' );
} );
Expand Down

0 comments on commit 93805cb

Please sign in to comment.