Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Description
The
Html::_namespaceInputs()function can't take numbers as a namespace, because they break the regex replacement pattern. Numbers get concatenated with the capture reference, which changes the reference number.Problem:
'$1' . $namespace . '[$3]$4$2'turns into'$13[$3]$4$2'when$namespace = '3'. The reference$1changed to$13.This twig code
{{ '<input name="test">'|namespace('3')|raw }}currently generates this html
More info from php.net/manual/en/function.preg-replace
Related issues
-/-