WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 13 months ago

Last modified 13 months ago

#9306 closed enhancement (duplicate)

Additional smart quote suggestion

Reported by: cloak42 Owned by:
Milestone: Priority: low
Severity: trivial Version:
Component: Formatting Keywords: wptexturize
Focuses: Cc:

Description

If a user writes a post that contains a quotation inside parentheses, the open quote mark is not used. I suggest that when a quotation mark (double or single) is used after an open parenthesis, it should be a left-quote “ instead of a right quote ”. In order to be as complete as possible, it would probably be best to ensure that this is only done in the event that white space is used prior to the open parenthesis so as to prevent it printing the wrong one if, say, a sad-face smiley is used inside a quotation, like so:

She told me, "Aw, you make me a sad panda now. :("

If it's done so that it will only open the quote correctly after white space \s or a carriage return, I think that will cover the vast majority, if not all, of the situations where it would need to be used.

Change History (11)

comment:1 @FFEMTcJ6 years ago

  • Milestone changed from Unassigned to Future Release

comment:2 @Denis-de-Bernardy6 years ago

  • Component changed from General to Formatting
  • Owner anonymous deleted

comment:3 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added

comment:4 @Denis-de-Bernardy6 years ago

  • Milestone changed from Future Release to 2.9

comment:5 @janeforshort5 years ago

  • Milestone changed from 2.9 to Future Release

Punting due to feature freeze.

comment:6 @solarissmoke4 years ago

  • Keywords close added; needs-patch smart quote replacement preg_replace removed

I got this to work just by adding a space after the last quotation mark - it then renders as a proper closing quote. IMO this is quite edge and messing with how brackets are handled could break other things.

comment:7 @westi4 years ago

#4539 has a lot of changes to this code.

This should be reviewed when the changes there are reviewed and committed.

comment:8 @nacin15 months ago

  • Keywords wptexturize added

comment:9 @miqrogroove13 months ago

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

Fixed in [11813]

I tested this post body:

("This is a test quote")

The output was

<p>(&#8220;This is a test quote&#8221;)</p>

This is the intended behavior since version 2.9.

comment:10 @SergeyBiryukov13 months ago

  • Keywords close removed
  • Resolution changed from worksforme to duplicate

Duplicate of #1418.

comment:11 @SergeyBiryukov13 months ago

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