Make WordPress Core


Ignore:
Timestamp:
12/01/2014 03:20:13 AM (10 years ago)
Author:
johnbillion
Message:

Allow brackets in a URL when it's sanitised for a redirect. Brackets are valid in query parameters.

Fixes #30308
Props voldemortensen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/redirect.php

    r30683 r30684  
    1717        $this->assertEquals('http://example.com/whyisthisintheurl/?param[1]=foo', wp_sanitize_redirect('http://example.com/whyisthisintheurl/?param[1]=foo'));
    1818        $this->assertEquals('http://[2606:2800:220:6d:26bf:1447:aa7]/', wp_sanitize_redirect('http://[2606:2800:220:6d:26bf:1447:aa7]/'));
     19        $this->assertEquals('http://example.com/search.php?search=(amistillhere)', wp_sanitize_redirect('http://example.com/search.php?search=(amistillhere)'));
    1920    }
    2021}
Note: See TracChangeset for help on using the changeset viewer.