Make WordPress Core

#49833 closed enhancement (fixed)

Twenty Twenty: HTML in featured image caption is being escaped

Reported by: pierlo Owned by: ianbelanger
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch good-first-bug has-screenshots
Focuses: Cc:


Featured images that contain HTML in their captions are being escaped in Twenty Twenty. A valid case for having HTML here would be to link to the original source the image was taken, or even a way to credit the author of the image.

Attachments (2)

49833.diff (652 bytes) - added by pierlo 16 months ago.
Capture d’écran 2020-05-23 à 11.07.14.png (207.9 KB) - added by audrasjb 15 months ago.
Testing the patch with various HTML elements

Download all attachments as: .zip

Change History (12)

16 months ago

#1 @pierlo
16 months ago

  • Keywords has-patch added

#2 @spacedmonkey
16 months ago

  • Version set to 5.3

#3 @spacedmonkey
15 months ago

  • Keywords good-first-bug 2nd-opinion added

#4 @JavierCasares
15 months ago

  • Keywords has-screenshots added

Works for me.




#5 @spacedmonkey
15 months ago

  • Milestone changed from Awaiting Review to 5.5

15 months ago

Testing the patch with various HTML elements

#6 @audrasjb
15 months ago

  • Keywords commit added; 2nd-opinion removed
  • Owner set to audrasjb
  • Status changed from new to accepted

I tested 49833.diff with various HTML elements and it looks good to me.

Removing 2nd-opinion and marking this ticket for commit.

#7 @ianbelanger
14 months ago

  • Owner changed from audrasjb to ianbelanger
  • Status changed from accepted to assigned

Reviewing for commit.

#8 @ianbelanger
14 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 47940:

Bundled Themes: Twenty Twenty HTML in featured image caption is being escaped.

Fixes the issue by replacing esc_html with wp_kses_post in the caption in featured images.

Props pierlo, JavierCasares, audrasjb.
Fixes #49833.

#9 @ianbelanger
14 months ago

  • Keywords fixed-major added; commit removed
  • Milestone changed from 5.5 to 5.4.3
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

#10 @desrosj
13 months ago

  • Keywords fixed-major removed
  • Milestone changed from 5.4.3 to 5.5
  • Resolution set to fixed
  • Status changed from reopened to closed

With 5.5 just under 5 weeks away, there is no 5.4.3 planned. Moving back to the 5.5 milestone.

Note: See TracTickets for help on using tickets.