Make WordPress Core

Opened 12 months ago

Closed 7 months ago

#24293 closed enhancement (fixed)

$allowedposttags to allow value for <li>

Reported by: kraftbj Owned by: nacin
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch commit 3.7-early
Focuses: Cc:


HTML 5 allowed the value attribute in <li> elements for use with ols (e.g. setting <ol><li value="31"> would result in that item of the ol rendering as 31.

$allowedposttags strips that out currently, as that's not allowed.

Submitting a patch to allow the value attribute.

Attachments (1)

24293.patch (314 bytes) - added by kraftbj 12 months ago.
added value to li in $allowedposttags in /wp-includes/kses.php

Download all attachments as: .zip

Change History (7)

kraftbj12 months ago

added value to li in $allowedposttags in /wp-includes/kses.php

comment:1 kraftbj12 months ago

  • Cc bk@… added
  • Keywords has-patch added

comment:2 SergeyBiryukov12 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.6

comment:3 kraftbj11 months ago

From the last IRC chat, nacin mentioned this may not be so straightforward of a patch, needing to ensure proper escaping, etc. I'm not sure the best way to ensure of this since we're just needing to add an extra attribute.

Happy to do the work to learn the process; can someone help me with what direction to go in to ensure that adding value attribute to the li tag works as it should?

A very similar "start" attribute to the ol tag is already in $allowedposttags.

comment:4 ocean9010 months ago

  • Component changed from Security to Formatting
  • Keywords 3.7-early added
  • Milestone changed from 3.6 to Future Release
  • Type changed from defect (bug) to enhancement

comment:5 wonderboymusic9 months ago

  • Milestone changed from Future Release to 3.7

these are all marked 3.7-early

comment:6 nacin7 months ago

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

In 25460:

Allow the value attribute for list items processed by kses.

props kraftbj.
fixes #24293.

Note: See TracTickets for help on using tickets.