Skip to content

Commit 609fbd6

Browse files
committed
Add test to make sure that <br /> tags are not removed from the output.
1 parent 1f03a1b commit 609fbd6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/AutolinkerSpec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,12 @@ describe( "Autolinker", function() {
575575
} );
576576

577577

578+
it( "should NOT remove `br` tags from the output (Issue #46)", function() {
579+
var result = autolinker.link( "Testing<br /> with<br/> br<br> tags" );
580+
expect( result ).toBe( "Testing<br /> with<br/> br<br> tags" );
581+
} );
582+
583+
578584
it( "should allow the full range of HTML attribute name characters as specified in the W3C HTML syntax document (http://www.w3.org/TR/html-markup/syntax.html)", function() {
579585
// Note: We aren't actually expecting the HTML to be modified by this test
580586
var inAndOutHtml = '<ns:p>Foo <a data-qux-="" href="http://www.example.com">Bar<\/a> Baz<\/ns:p>';

0 commit comments

Comments
 (0)