FIX: Protocol-less links that begin with a shouldn't error

This commit is contained in:
Robin Ward
2016-07-20 13:44:12 -04:00
parent 16383a1749
commit b9177af1eb
2 changed files with 6 additions and 3 deletions

View File

@ -551,6 +551,7 @@ test('basic bbcode', function() {
test('urls', function() {
cookedPara("[url]not a url[/url]", "not a url", "supports [url] that isn't a url");
cookedPara("[url]abc.com[/url]", "abc.com", "no error when a url has no protocol and begins with a");
cookedPara("[url]http://bettercallsaul.com[/url]", "<a href=\"http://bettercallsaul.com\">http://bettercallsaul.com</a>", "supports [url] without parameter");
cookedPara("[url=http://example.com]example[/url]", "<a href=\"http://example.com\">example</a>", "supports [url] with given href");
cookedPara("[url=http://www.example.com][img]http://example.com/logo.png[/img][/url]",