Allow safe html markup in captions
-
Image captions should support the same “safe” markup that other post content supports. This would allow, for instance, links in photo credits, and richer text styling options.
The following modification accomplishes this:
<figcaption class="phoroswipe-gallery-caption" style="<?php esc_attr_e($caption_style); ?>"><?php echo wp_kses_post($image_caption); ?></figcaption>
where the caption itself is protected by
wp_kses_post
rather thanesc_attr_e
. (all the actual attributes are still protected withesc_attr_e
).Because of nonsense work rules, it is not practical for me to create a pull request with this change.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Allow safe html markup in captions’ is closed to new replies.