e39d4869243c3c693ee0237c0d1e3b8fe79a733f
Template::expandAll swapped every expression notation in the raw template string with str_replace, so the literal text surrounding the expressions was copied verbatim and never percent encoded. The expression detection pattern is now used to split the template into an ordered list of parts: literals are encoded once at construction, expressions stay Expression objects, and the expansion simply concatenates them. Keeping the parts apart is what prevents the already encoded expansion results from being encoded a second time. Fixes the "Additional Examples 8: Literal Encoding" case of the vendored uritemplate-test compliance suite.
Description
My contributions to thephpleague/uri-src: 4 commits, 1 merged PRs
63 KiB
0 Stars
1 Watchers
0 Forks
Languages
PHP
100%