Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28483 closed defect (bug) (fixed)

Logic Error in Texturize Element Stack

Reported by: miqrogroove's profile miqrogroove Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: minor Version: 3.8
Component: Formatting Keywords: wptexturize has-patch
Focuses: Cc:

Description

Test case:

wptexturize( '<span>hello</code>---</span>' );

Expected result:

<span>hello</code>&#8212;</span>

Actual result:

<span>hello</code>---</span>

This is being caused by a rather obvious logic flaw in the texturize stack, and inadequate unit testing.

Attachments (1)

miqro-28483.patch (3.1 KB) - added by miqrogroove 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 @miqrogroove
10 years ago

  • Keywords needs-unit-tests wptexturize added
  • Severity changed from normal to minor

This ticket was mentioned in IRC in #wordpress-dev by wonderboymusic. View the logs.


10 years ago

#3 @miqrogroove
10 years ago

  • Keywords has-patch added; needs-unit-tests removed

#4 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0

#5 @wonderboymusic
10 years ago

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

In 28763:

Add unit tests to confirm that --- is properly converted to &#8212; by wptexturize() where appropriate.

Props miqrogroove.
Fixes #28483.

Note: See TracTickets for help on using tickets.