In the _showImage
function find the line that says
if( title )
$rgGallery.find('div.rg-caption').show().children('p').empty().text( title );
Replace the text
function on the second line with html
.
You could further make this functionality optional using another data attribute
var skip_escape_html = $thumb.data('skip_escape_html');
and then calling a function based on that
$rgGallery.find('div.rg-caption').show().children('p').empty()[ skip_escape_html ? 'html' : 'text' ]( title )