Re: RFC about automatic template escaping
| From: | Jan Tvrdík | Date: | Tue, 22 Mar 2016 13:25:28 +0000 |
| Subject: | Re: RFC about automatic template escaping | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91845@lists.php.net to get a copy of this message | ||
On Tue, 22 Mar 2016 14:01:09 +0100, Craig Duncan <php@duncanc.co.uk> wrote:
No. That argument would only be valid, if the parser consisted only of a single regexp. When you combine PHP code with PCRE you loose nothing from PHP's turing completeness and it's ability to parse HTML. That being said I'm not claiming that Latte parser is 100 % correct HTML parser (neither is most existing HTML parsers in the world). I'm saying that it could be (to the extend of what's possible to statically analyze, i.e. if editor could highlight the code properly). Regards, Jan TvrdikWhy do you assume that Latte parser is limited by regexp ability to parse HTML?Because it is: https://github.com/nette/latte/blob/19b759b550caaad75ca0dee5f0d85f9ffb59c845/src/Latte/Parser.php#L124