dualfroz e39d486924 Percent encode the URI template literals as per RFC6570 section 3.1
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.
2026-09-06 00:58:45 +02:00
S
Description
My contributions to thephpleague/uri-src: 4 commits, 1 merged PRs
63 KiB
0 Stars 1 Watchers 0 Forks
Languages
PHP 100%