Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33179 closed defect (bug) (fixed)

Caption shortcode shouldn't output an invalid HTML ID

Reported by: helen's profile helen Owned by: helen's profile helen
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:


While looking more closely at core shortcodes post-4.2.3, I noticed that the caption one escapes the provided ID and is safe, but that doesn't mean it's necessarily going to produce a valid HTML ID. We should also use sanitize_html_class(), since that's what it's for.

Change History (2)

#1 @helen
9 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 33489:

Ensure the caption shortcode outputs a valid HTML ID.

fixes #33179.

#2 @helen
9 years ago

In 33506:

Fix a unit test failure after [33489].

see #33179.

Note: See TracTickets for help on using tickets.