[wp-trac] [WordPress Trac] #58902: add_query_arg() should esc_url_raw() REQUEST_URI
WordPress Trac
noreply at wordpress.org
Tue Oct 10 21:10:23 UTC 2023
#58902: add_query_arg() should esc_url_raw() REQUEST_URI
-------------------------------------------------+-------------------------
Reporter: jorbin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch has-testing-info has- | Focuses:
unit-tests changes-requested |
-------------------------------------------------+-------------------------
Comment (by ivanzhuck):
@oglekler
well... I think we can't left the old test line as is, because the test
fails with it after applying the patch from @audrasjb. We should change
one of both: the test or the code)
{{{
root at 83c80e784dc4:/var/www# ./vendor/bin/phpunit --group add_query_arg
Installing...
Running as single site... To run multisite, use -c
tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-
http.
PHPUnit 9.6.13 by Sebastian Bergmann and contributors.
Warning: Your XML configuration validates against a deprecated
schema.
Suggestion: Migrate your XML configuration using "--migrate-
configuration"!
F...... 7 / 7
(100%)
Time: 00:00.382, Memory: 171.50 MB
There was 1 failure:
1) Tests_Functions::test_add_query_arg
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'baz=1&foo=1'
+'http://baz=1?foo=1'
/var/www/tests/phpunit/tests/functions.php:539
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:106
FAILURES!
Tests: 7, Assertions: 91, Failures: 1.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58902#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list