WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#27602 closed defect (bug) (fixed)

wptexturize ignores text after unmatched [

Reported by: miqrogroove Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: trivial Version: 3.8
Component: Formatting Keywords: wptexturize
Focuses: Cc:

Description

In handling the element and shortcode delimeters to avoid changing their contents, the function rather lazily ignores everything after the first char of the post or split phrase. You can try these in the editor with the preview button.

Test case:

[Hello world, this is my post.  "As you may know, I like curly quotes."

Compare with:

H[ello world, this is my post.  "As you may know, I like curly quotes."

Change History (4)

#1 @miqrogroove
5 years ago

  • Keywords wptexturize added
  • Severity changed from normal to trivial

#2 @miqrogroove
5 years ago

Patch added on #12690. These are two different bugs but should be fixed together.

#3 @wonderboymusic
5 years ago

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

In 28727:

In wptexturize(), ensure that texturization does not corrupt contents of HTML elements, HTML comments, and smartcode attributes.

Adds a variety of unit tests/assertions.

Props miqrogroove.
Fixes #12690, #8912, #27602.

#4 @wonderboymusic
5 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.