| @@ -41,10 +41,15 @@ | ||
| 41 | 41 | ?> |
| 42 | 42 | <?php endif; ?> |
| 43 | 43 | </div> |
| 44 | 44 | </div> |
| 45 | - <?php if ( $caption ): ?> | |
| 45 | + <?php if ( !empty( $caption ) ): ?> | |
| 46 | 46 | <figcaption class="mgl-caption"> |
| 47 | - <p><?php echo wp_kses_post( $caption ) ?></p> | |
| 47 | + <p><?php echo wp_kses($caption, [ | |
| 48 | + 'strong' => [], // Bold | |
| 49 | + 'b' => [], // Bold alternative | |
| 50 | + 'em' => [], // Italic | |
| 51 | + 'i' => [] // Italic alternative | |
| 52 | + ]) ?></p> | |
| 48 | 53 | </figcaption> |
| 49 | 54 | <?php endif; ?> |
| 50 | 55 | </figure> |