WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 7 weeks ago

#8775 reopened defect (bug)

Numbers in quotation marks get wrong smart quotes

Reported by: filosofo Owned by:
Priority: normal Milestone: Future Release
Component: Formatting Version: 2.8
Severity: normal Keywords: has-patch needs-testing needs-unit-tests
Cc: mdhansen@…, damst

Description

Have a number in quotation marks, such as "12345" or '12345' and wptexturize converts the right quotation mark to double-prime and prime marks, respectively.

Patch fixes.

Attachments (6)

number_curly_quotes.diff (1.3 KB) - added by filosofo 4 years ago.
number_curly_quotes.2.diff (1.3 KB) - added by mrmist 4 years ago.
Update against current trunk
8775-quotes-patch.diff (1.2 KB) - added by aliso 11 months ago.
Quotation mark fix for most recent code in formatting.php
before-8775-patch.png (1.5 KB) - added by MikeHansenMe 8 months ago.
screenshot of problem
after-8775-patch.png (2.1 KB) - added by MikeHansenMe 8 months ago.
screenshot after patch
8775.4.diff (1.2 KB) - added by MikeHansenMe 8 months ago.
Updated patch path relative from wp folder

Download all attachments as: .zip

Change History (31)

comment:1 mrmist4 years ago

Probably a dupe see also #7754 #4539 #3810 #4116 #1258

There neeeds to be a big old wp_texturize fix task or something.

comment:2 ryan4 years ago

  • Component changed from General to Formatting
  • Owner anonymous deleted

comment:4 Denis-de-Bernardy4 years ago

  • Keywords needs-testing added

mrmist4 years ago

Update against current trunk

comment:5 mrmist4 years ago

  • Keywords tested commit added; needs-testing removed

Updated patch. Tested with numbers and single/double quotes. Seems to work. doesn't appear to break anything else, so marking as tested. Comitting would seem the fastest way of geting more test exposure.

comment:7 follow-up: Denis-de-Bernardy4 years ago

are there any unit tests on wptexturize?

comment:8 Denis-de-Bernardy4 years ago

or at least, known, funky test cases to watch for?

comment:9 azaozz4 years ago

  • Keywords needs-testing added; tested wptexturize formatting curly-quotes numbers commit removed

comment:10 in reply to: ↑ 7 azaozz4 years ago

Replying to Denis-de-Bernardy:

are there any unit tests on wptexturize?

Seems like this needs more testing with non-latin languages.

comment:11 Denis-de-Bernardy4 years ago

  • Component changed from Formatting to i18n
  • Owner set to nbachiyski

k... moving this over to i18n then. I wouldn't know what to test on this front. :-)

D.

comment:12 azaozz4 years ago

Also see #3810.

comment:13 Denis-de-Bernardy4 years ago

  • Keywords needs-unit-tests added
  • Milestone changed from 2.8 to Future Release

punting pending unit tests... even though, like the one wpautop one I just punted, I think this should get committed outright.

comment:14 Denis-de-Bernardy4 years ago

  • Component changed from i18n to Formatting
  • Milestone changed from Future Release to 2.9
  • Owner nbachiyski deleted

comment:15 janeforshort4 years ago

  • Milestone changed from 2.9 to Future Release

Punting b/c no tests done in 6 months and we're in beta.

comment:16 follow-up: filosofo3 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Let's be realistic.

comment:17 in reply to: ↑ 16 ; follow-up: Viper007Bond2 years ago

  • Milestone set to Future Release
  • Resolution wontfix deleted
  • Status changed from closed to reopened

It's still a valid issue. Just because progress isn't being made isn't reason enough to close the ticket.

comment:18 in reply to: ↑ 17 Denis-de-Bernardy2 years ago

Replying to Viper007Bond:

It's still a valid issue. Just because progress isn't being made isn't reason enough to close the ticket.

Any chances you've got a patch? :-)

comment:19 filosofo2 years ago

We have a patch. It's the prerequisite wptexturize unit tests that are missing.

aliso11 months ago

Quotation mark fix for most recent code in formatting.php

comment:21 aliso11 months ago

It looks like the previous patch won't work with the code change from [19795]. I attached a patch that fixes it in the most recent code.

This also solves part 1 of #16957 (same bug).

MikeHansenMe8 months ago

screenshot of problem

MikeHansenMe8 months ago

screenshot after patch

MikeHansenMe8 months ago

Updated patch path relative from wp folder

comment:22 MikeHansenMe8 months ago

  • Cc mdhansen@… added

aliso's patch works for me. I updated the patch path and included some screenshots of the problem.

Last edited 8 months ago by MikeHansenMe (previous) (diff)

comment:23 damst6 months ago

  • Cc damst added

comment:25 aliso7 weeks ago

Any idea when this fix can make it into core? The unit tests should be the same as in http://unit-tests.trac.wordpress.org/changeset/757, right?

Note: See TracTickets for help on using tickets.