Added HTML escape for caption

caption is not added correctly, when title attribute have HTML tags.

ex. &lt;a href="image.jpg" class="boxer" title="&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;"&gt;