The following BBCode will currently produce an exception (reproduced on try.discourse.org):
The error message in production is “TypeError: e.splice is not a function” - this refers to
Discourse.BBCode.replaceBBCode('url', ...) block there. It seems that
contents is a string but the code attempts to treat it as an array. I didn’t find all the pieces creating this variable, but for some reason this only appears to be an issue if the URL starts with a lower-case letter “a”.