This is PHP btw.
<?
$caption = '
<table border="0">
<tr>
<td width="100">Blah blah blah my grandmother is an armadillo.</td>
<td>
<a href="http://www.mysite.com/someplace/images.php?group=mygroup&bank=images" target="_blank">
<img src="http://www.mysite.com/someplace/gfx/go_to_gallery.jpg" border="0">
</a>
</td></tr>
</table>
';
?>
and then simply add
caption:`<? echo htmlentities($caption); ?>`"
And it's all formatted for you. Easy peasy.
Good luck!