Opened 20 years ago
Closed 15 years ago
#1258 closed defect (bug) (duplicate)
Curly quotes mixups
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9.2 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
I think there is a tiny problem in the wordpress text renduring:
when you use single quotes in the text, WP converts them to single fancy quotes. However, some quotes are transformed in the wrong direction.
e.g. if you type: 'products', 'services', you get ‘products’, ’services’ rather than ‘products’, ‘services’.
I think the problem comes from WP detecting something like /'s/ rather than /\w's/
’s
Attachments (1)
Change History (23)
#3
@
18 years ago
- Keywords needs-patch added; dev-feedback removed
- Summary changed from text rendering to Curly quotes mixups
Yep. 2.1, you get:
‘products’, ’services’,
#4
@
18 years ago
- Milestone set to 2.2
- Version changed from 1.5.1 to 2.1
(Notice the direction of the curly quotes)
#10
@
18 years ago
This is wp_texturize() doing this. It specifically replaces single-quote-S characters with ’s. This then messes up the normal quote matching to try to make the quotes prettier. Something a bit more clever in that function might be able to fix it, perhaps by looking for a letter (any letter) preceding the 's before thinking it should be an apostrophe?
#11
@
17 years ago
- Description modified (diff)
- Milestone changed from 2.3 to 2.4 (next)
No patch -- punting.
#12
@
17 years ago
- Resolution set to worksforme
- Status changed from new to closed
I can't seem to replicate this in the trunk as of today. Posting:
'hello', 'world', 'tis
Appears to balance the quotes correctly.
#14
@
17 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
Actually, this still isn't working in 2.5; I think it was closed by someone who didn't quite realise what the problem is. It's not balancing quotes, it's a specific problem with the single quote before a lower-case s. i.e. in 'salmon' or 'spook'.
#16
@
17 years ago
Problem confirmed in latest SVN, it looks like it defaults to the ending curl, and for some reason has an additional rule to make sure that before an s does that too, when what it really should do is default as it does now, but if the preceding character is a space it should change to the beginning curl.
#17
@
17 years ago
I'm not proficient in regular expressions, but it looks like the function causing the problem is wptexturize(). There should be a simpler way of implementing the rules than what is there now, especially the arrays on lines 23 & 24. Anyways, anyone that is familiar with regular expressions can take a look at those two lines and it should be easy for them to fix.
#18
@
17 years ago
- Component changed from Template to General
- Keywords has-patch added; needs-patch removed
- Milestone set to 2.6
The patch I attached here is also included in a similar tweak for Ticket #4539. I apologize if this causes any trouble.
#19
@
16 years ago
- Keywords has-patch removed
- Milestone 2.9 deleted
- Resolution set to duplicate
- Status changed from reopened to closed
Closing this as a dupe of #4539. No point having two bugs if the same patch fixes both.
#21
@
15 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
- Version changed from 2.5 to 2.9.2
I know this was lumped into another ticket, but since it's 5 years old and still hasn't been resolved I think it deserves a ticket of its own… apologies if I'm not using Trac properly, btw, but I only registered to report this bug three years ago, and every time there's an upgrade and it still hasn't been fixed it drives me nuts.
Still, until I can actually contribute some code, I guess I shouldn't whinge too much :)
Is this still current in 2.1?