html: Don't generate empty <figcaption> tag

The current implementation always generate a <figcaption> tag even if there is no description, which results in code like this:

<figure>
<img src="blabla">
<figcaption></figcaption>
</figure>

 This is kinda useless, fix it by adding 2 simple check.