Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26290 closed defect (bug) (fixed)

wp_kses_normalize_entities destroys some valid entities that ent2ncr supports

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.7
Component: Formatting Keywords: has-patch
Focuses: Cc:

Description

We have a list of common html entities we convert for feeds.

We have a different list of entities kses allows.

They don't overlap and you can't extend the kses config to allow for all of them because it doesn't support entities like ¼

Attachments (1)

26290.diff (1.0 KB) - added by westi 11 years ago.
Simple patch to fix kses

Download all attachments as: .zip

Change History (6)

#1 @westi
11 years ago

In 26430:

Unit Tests: Add some simple test cases to highlight the types of html entity that kses currently blocks. See #26290

@westi
11 years ago

Simple patch to fix kses

#2 @westi
11 years ago

In 26431:

Unit Tests: Add the ticket number to the new tests. See #26290

#3 follow-up: @nacin
11 years ago

26290.diff looks good. In the future let's save unit tests for the same commit as the patch. Takes some adjusting to, for sure, but it's much kinder to our future selves.

#4 in reply to: ↑ 3 @westi
11 years ago

Replying to nacin:

26290.diff looks good. In the future let's save unit tests for the same commit as the patch. Takes some adjusting to, for sure, but it's much kinder to our future selves.

I'm not convinced by that I actually prefer them to be separate.

The ticket as a reference links them together.

#5 @westi
11 years ago

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

In 26440:

KSES: Extend support in wp_kses_normalize_entities to named entities with up to two numbers on the end of the name so as to support a wider list of valid entities.

Fixes â#26290

Note: See TracTickets for help on using tickets.