#20342 closed defect (bug) (fixed)
Opening Double Quote after 3 hyphens converted to double closing quote
Reported by: | PetesGuide | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.3.1 |
Component: | Formatting | Keywords: | wptexturize has-patch dev-feedback |
Focuses: | Cc: |
Description
The string:
<p>I also remember the line in "Casey at the Bat" when he struck out---"There is no Joy in Mudville!!!"</p>
is converted to this in WordPress 3.3.1:
<p>I also remember the line in “Casey at the Bat” when he struck out—”There is no Joy in Mudville!!!”</p>
Seems to be what should be an opening quote that follows an Em dash is always converted into a closing quote.
Attachments (8)
Change History (22)
#2
@
11 years ago
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to Future Release
#4
@
11 years ago
- Keywords has-patch dev-feedback added
20342.4.diff adds ';' to the list of characters after which a double quote (and single quote) is replaced with unicode equivalent. Previous attempts broke other unit test in formatting, verified this change does not break any other tests while resolving the test case in this ticket.
This ticket was mentioned in IRC in #wordpress-dev by adamsilverstein. View the logs.
11 years ago
#6
follow-up:
↓ 7
@
11 years ago
This patch would fix <"Test Quote">
which is currently broken.
It would also break things like Then he said, "Trying using the &"
#7
in reply to:
↑ 6
@
11 years ago
Replying to miqrogroove:
This patch would fix
<"Test Quote">
which is currently broken.
It would also break things like
Then he said, "Try using the &"
Thanks for the feedback.
I tried testing these two strings via a unit test in 20342-tests.2.diff and don't see how the patch effects them. What were you expecting from wp_texturize and what are your results, before and after the patch?
#8
@
11 years ago
I'm using those as editor inputs on the Visual tab. They are converted to HTML before wptexturize(). If I had to trade off quotes ending with & for quotes wrapped in angle braces, I would be in favor. Both seem trivial to me.
#9
@
11 years ago
Perhaps the larger concern is that including the semi-colon arbitrarily could have unwanted results on non-UTF-8 websites. That would be a question for the staff to tackle.
#10
@
11 years ago
Note the patch for #23185 will put hyphen conversion at the end of wptexturize, so we can consider simply allowing hyphens before quotes. This will work as long as we never expect input like, "This is my weird quote-"
Sorry for you never hearing anything, PetesGuide. This sounds like a lot of other wptexturize tickets. (full list). If a contributor can supply a unit test for this, we'll be in good shape to going forward with possible fixed.