Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30344 closed defect (bug) (fixed)

Curly Quotes Missing for Strange Input

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

Description

wptexturize() gives unexpected results if an Administrator uses a post body like this:

<> "Hello world" <>

This was caused by a small mistake in the new regexp.

Attachments (1)

miqro-30344.patch (1.3 KB) - added by miqrogroove 10 years ago.

Download all attachments as: .zip

Change History (11)

#1 @miqrogroove
10 years ago

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

#2 @miqrogroove
10 years ago

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

#3 @miqrogroove
10 years ago

  • Keywords 4.2-early added

#4 @iseulde
10 years ago

  • Milestone changed from Awaiting Review to 4.2

has-patch 4.2-early so moving to 4.2.

This ticket was mentioned in Slack in #core by drew. View the logs.


10 years ago

#6 @DrewAPicture
10 years ago

  • Keywords good-first-bug reporter-feedback added

@miqrogroove: Could you possibly be a little more specific on what "unexpected results" looks like? I got the same result with and without the patch using your test content.

#7 @helen
10 years ago

  • Keywords good-first-bug removed

#8 @miqrogroove
10 years ago

  • Keywords reporter-feedback removed

Add the unit tests without the changes to wptexturize and the tests should fail in phpunit. That would be the unexpected result.

#9 @DrewAPicture
10 years ago

  • Keywords commit added

Confirmed that tests fail before and pass after applying the code changes.

#10 @wonderboymusic
10 years ago

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

In 31965:

Alter the regex in wptexturize() to properly handle input like: <> "Hello world" <>.

Updates unit test data.

Props miqrogroove.
Fixes #30344.

Note: See TracTickets for help on using tickets.