Make WordPress Core


Ignore:
Timestamp:
02/03/2020 12:12:22 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Canonical: When removing trailing punctuation from query string arguments, match the whole query var name.

Props daveslaughter.
Fixes #49347.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/noRewrite.php

    r47122 r47169  
    3535         * [1]: Expected results: Any of the following can be used.
    3636         *      array( 'url': expected redirection location, 'qv': expected query vars to be set via the rewrite AND $_GET );
    37          *      array( expected query vars to be set, same as 'qv' above )
    38          *      (string) expected redirect location
    39          * [3]: (optional) The ticket the test refers to, Can be skipped if unknown.
     37         *      array( expected query vars to be set, same as 'qv' above );
     38         *      (string) expected redirect location.
     39         * [3]: (optional) The ticket the test refers to. Can be skipped if unknown.
    4040         */
    4141        return array(
     
    268268            array( '/page/2/%E2%80%9D', '/page/2/', 20383 ), // Encoded closing curly quote.
    269269
    270             array( '/?page_id=1', '/?p=1' ), // Redirect page_id to p (should cover page_id|p|attachment_id to one another.
     270            array( '/?page_id=1', '/?p=1' ), // Redirect page_id to p (should cover page_id|p|attachment_id to one another).
    271271            array( '/?page_id=1&post_type=revision', '/?p=1' ),
    272272
    273273            array( '/?feed=rss2&p=1', '/?feed=rss2&p=1', 21841 ),
    274274            array( '/?feed=rss&p=1', '/?feed=rss2&p=1', 24623 ),
     275
     276            array( '/?comp=East+(North)', '/?comp=East+(North)', 49347 ),
    275277        );
    276278    }
Note: See TracChangeset for help on using the changeset viewer.