Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #29608


Ignore:
Timestamp:
09/09/2014 09:22:57 PM (10 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29608

    • Property Milestone changed from Awaiting Review to 4.0.1
  • Ticket #29608 – Description

    initial v1  
    99
    1010'''Expected result:''' WordPress 3.9.1
    11 
     11{{{
    1212[shortcode meta_compare=">=" ]
     13}}}
    1314will end up passing a meta_compare value of >= to get_posts(). i.e.
    14  [meta_compare] = >=
    15 
     15{{{
     16[meta_compare] = >=
     17}}}
    1618'''Unexpected result:''' WordPress 4.0
    1719
    1820the array field value passed to get_posts() becomes
    19   [meta_compare] => ’>=’
    20 
     21{{{
     22[meta_compare] => ’>=’
     23}}}
    2124This problem is caused by wptexturize(), which converts a double quote to ” or a single quote to ’
    2225
    2326Pragmatic workaround:
    24 
    2527{{{
    2628 remove_filter( "the_content", "wptexturize" );
    2729}}}
    2830
    29 
    3031Alternatively, I could introduce a specific test on the meta_compare parameter value and strip unexpected entities.
    3132I may have to do this anyway since I've seen a situation where the visual editor  has converted > to > which has caused a similar failure.
    32 
    33 
    34 
    35