Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#15241 closed defect (bug) (duplicate)

wptexturize with html between quotes

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

Description

There appears to be a problem with quotes in a post when used in combination with bold text followed by a comma. For example, the following:

"<strong>Quoted Text</strong>",

...will create bold quoted text but the closing quote will be backwards.

Attachments (3)

test_includes_formatting.php.diff (904 bytes) - added by nacin 15 years ago.
New unit test
patch-incl-fixed-unit-test.txt (1.5 KB) - added by norbertm 15 years ago.
patch-incl-fixed-unit-test.diff (1.5 KB) - added by norbertm 15 years ago.

Download all attachments as: .zip

Change History (26)

#2 @norbertm
15 years ago

Technically related to #4539.

#3 @norbertm
15 years ago

  • Cc norbertm added

#4 @norbertm
15 years ago

Working on a patch that resolves both.

#5 @norbertm
15 years ago

Submitted patch to #4539.

#6 @westi
15 years ago

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

(In [16280]) Improved RegEx for quote matching in wptexturize. Fixes #4539 and #15241 props norbertm.

#7 @nacin
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This broke this string:

That means every moment you're working on something without it being in the public it's actually dying.

Before:

That means every moment you&#8217;re working on something without it being in the public it&#8217;s actually dying.

After:

That means every moment you&#8216;re working on something without it being in the public it&#8217;s actually dying.

#8 @norbertm
15 years ago

That should not happen because first it would replace words with quotes in the middle and process any leftover quotes after all such occurrences were found. Looking into it.

@nacin
15 years ago

New unit test

#9 @norbertm
15 years ago

  • Keywords has-patch added; needs-patch removed

Good catch, thanks. Fixed by changing the order of replacements. Also fixed the unit test which was missing some ampersands.

#10 @westi
15 years ago

Unit tests updated in [UT319]

#11 @westi
15 years ago

Unit tests fixed in [UT320]. I should read the failing tests more carefully pre-coffee ;-)

#12 @westi
15 years ago

(In [16378]) Fix regression in wptexturize with single quotes when used for contraction. See #15241 props norbertm.

#13 @westi
15 years ago

@norbertm - would you be able to spend a little bit of time fleshing out the Unit Tests with some extra tests to ensure we cover all scenarios here?

It would be good to increase the coverage on this function as it is a very fragile thing to change ;-)

#14 @wahgnube
15 years ago

The problem still exists for me, even after [16378]. e.g., I see sentences like the following on my site:

This isn&#8216;t inherently bad, but I don&#8217;t think it&#8217;s normal.

#15 @norbertm
15 years ago

@westi - definitely! I already included a bunch of tests with #4539 but there is room for more and it makes sense to clean it all up.

@wahgnube - will look into that, thanks!

#16 @alexkingorg
15 years ago

I think there is a related by different issue here #15444 however please close as a dup if that is addressed by this patch.

#17 @nacin
15 years ago

  • Severity changed from normal to critical

Closed #15444 as a duplicate. We should turn that into a unit test. Upping the severity based on what's in trunk.

#18 @nacin
15 years ago

(In [16409]) Revert changes to wptexturize() until test cases pass. Reverts [16280], [16378]. see #4539 and #15241.

#19 @nacin
15 years ago

  • Severity changed from critical to normal

#20 @norbertm
15 years ago

@westi - Working on more coverage.

@wahgnube - Able to reproduce. Included test case and fix in #4539.

@nacin - Added unit test to #15444. Fix in progress.

#21 @norbertm
15 years ago

Updates submitted to #4539.

#22 @nacin
14 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

#23 @ocean90
14 years ago

  • Milestone 3.1 deleted
Note: See TracTickets for help on using tickets.