[wp-trac] Re: [WordPress Trac] #1418: wptexturize doesn't correctly
translate doublequote in brackets
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 4 22:16:01 GMT 2007
#1418: wptexturize doesn't correctly translate doublequote in brackets
--------------------------+-------------------------------------------------
Reporter: Kafkaesqui | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.4
Component: General | Version: 1.5.1.1
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+-------------------------------------------------
Comment (by jokeofalltrades):
Example:
("ABC") should render as (“NRDC”), but in fact renders as
(”ABC“) - precisely backwards. These types of expressions are
often used in legal texts (and lots of other texts) to signify
abbreviations that will be used throughout the text the first time they
are encountered. The only example I can find at the moment is
[http://emmyandmichael.us/registry/ here] (search for "NRDC").
As far as I can see, ideal behavior for wptexturize would require that:
(1) opening quotes (entities “ or ‘) ''never'' appear
immediately before a closing bracket of any sort or whitespace of any
sort; and
(2) closing ''double'' quotes (entity ”) should ''never'' appear
immediately after an opening bracket of any sort or whitespace of any
sort.
The closing single quote (entity ’) is trickier, because there may be
times when a parenthetical or other bracketed expression starts with a
contracted year reference or a slang term ("cockney") beginning with an
apostrophe (though these should be rare), and obviously any of those
expressions will usually be preceded by whitespace.
The two rules above, though, should be top-level rules that trump all
other smart-quote replacement rules, shouldn't they?
See also ticket #1258 for problems with quotes near whitespace.
--
Ticket URL: <http://trac.wordpress.org/ticket/1418#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list