- this.caption = this.getVal(node, 'figcaption', 'html');
- // remove '<i>
- if (this.caption.trim().match(/^<i[^>]*>/i)) {
- this.caption = this.caption.trim().replace(/^<i[^>]*>/i, '').replace(/^<\/i>$/i, '');
- }
- this.caption_display = this.getVal(node, 'figcaption', 'style', 'display');
+ var figcaption = this.getVal(node, 'figcaption', false);
+ this.caption = this.getVal(figcaption, 'i', 'html');
+
+ this.caption_display = this.getVal(node, 'figcaption', 'data-display');