Skip to content

Commit 03ac9af

Browse files
committed
Add test to make sure Autolinker strips url prefixes from anchor tag text by default.
1 parent 0c73285 commit 03ac9af

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
@@ -776,6 +776,12 @@ describe( "Autolinker", function() {
776776
expect( result ).toBe( 'Test <a href="http://www.url.com">http://www.url.com</a>' );
777777
} );
778778

779+
780+
it( "should remove the prefix by default", function() {
781+
var result = Autolinker.link( "Test http://www.url.com", { newWindow: false } );
782+
expect( result ).toBe( 'Test <a href="http://www.url.com">url.com</a>' );
783+
} );
784+
779785
} );
780786

781787

0 commit comments

Comments
 (0)