diff --git a/app/assets/javascripts/discourse/dialects/bbcode_dialect.js b/app/assets/javascripts/discourse/dialects/bbcode_dialect.js index 41d2b5347..35390a8f3 100644 --- a/app/assets/javascripts/discourse/dialects/bbcode_dialect.js +++ b/app/assets/javascripts/discourse/dialects/bbcode_dialect.js @@ -136,7 +136,6 @@ Discourse.BBCode.replaceBBCode('li', function(contents) { return ['li'].concat(D Discourse.BBCode.rawBBCode('img', function(contents) { return ['img', {href: contents}]; }); Discourse.BBCode.rawBBCode('email', function(contents) { return ['a', {href: "mailto:" + contents, 'data-bbcode': true}, contents]; }); -Discourse.BBCode.rawBBCode('url', function(contents) { return ['a', {href: contents, 'data-bbcode': true}, contents]; }); Discourse.BBCode.rawBBCode('spoiler', function(contents) { if (/strong stronger", "accepts nested bbcode tags"); }); +test('url with images', function() { + format("[url=http://www.example.com][img]http://example.com/logo.png[/img][/url]", + "", + "supports [url] with an embedded [img]"); +}); test('invalid bbcode', function() { var cooked = Discourse.Markdown.cook("[code]I am not closed\n\nThis text exists.", {lookupAvatar: false}); equal(cooked, "

[code]I am not closed

\n\n

This text exists.

", "does not raise an error with an open bbcode tag.");