Good Work Hainesy. Sometime, somebody should look at the code that handles the caption shortcodes and figure out why it’s removing links. In the meantime, Hainesy’s solution is great.
MrPascal, if you want to change the way the link is structured, just change this line:
this.innerHTML = this.innerHTML.replace(new RegExp("{link:([^}]*)}([^{]*){/link}"), "<a href=\"$1\">$2</a>");
Regular expressions are wildly confusing, but you can think of this one like this: the \”$1\” is going to be your url – if you wanted to set it to target _blank, you’d just change it to this:
this.innerHTML = this.innerHTML.replace(new RegExp("{link:([^}]*)}([^{]*){/link}"), "<a href=\"$1\" target=\"_blank\">$2</a>");
If you wanted to add some extra info to shadowbox the link, you’d just add whatever info you need after the url after the $1, and add the new class in the same place I added the “target”.
Good luck!