Commit Graph
858 Commits
Author SHA1 Message Date
ahwelp 12566be05e Changing mustache to work with urfatBro 2023-01-24 14:46:05 +00:00
Justin Hileman b03b889490 Merge branch 'dynamic-names' 2022-08-23 09:12:39 -04:00
Justin Hileman 30853456a5 Update to v1.3.0 Mustache spec. 2022-08-23 09:12:16 -04:00
Justin Hileman 93f824d09a Remove exceptions on multiple * in dynamic names.
Per the finalized spec, these should be treated as lookup failures (i.e. rendered as empty strings) rather than exceptions.
2022-08-23 09:11:52 -04:00
Justin Hileman af4f8f7c0e Add more tests, fix a bug with block tags. 2022-08-23 09:11:52 -04:00
Justin Hileman 53944831cf Fix dynamic name (and filter!) validation accidentally applying to comments. 2022-08-23 09:11:52 -04:00
Justin Hileman 454b4c63e9 Better error message. 2022-08-23 09:11:52 -04:00
Justin Hileman f6c45e8c17 Dynamic names implementation. 2022-08-23 09:11:52 -04:00
Justin Hileman e62b7c3849 Merge branch 'release/2.14.2' 2022-08-23 09:07:01 -04:00
Justin Hileman aaff0a8bed Bump to v2.14.2 2022-08-23 09:06:47 -04:00
Justin Hileman e6256ea0d7 Remove dependency on deprecated YAML library.
Use spec-provided JSON files instead.
2022-08-09 11:19:28 -07:00
Justin Hileman 64e5609d0e Throw syntax exception for unclosed tags.
Fixes #395
2022-07-28 10:10:14 -04:00
Justin Hileman c9718673e5 Merge branch 'release/2.14.1' 2022-01-21 01:21:37 -05:00
Justin Hileman d36cd805c4 Bump to v2.14.1 2022-01-21 01:21:32 -05:00
Justin Hileman 579ffa5c96 Fix CVE-2022-0323 (improper neutralization of section names)
- Fixes possible RCE when rendering untrusted user templates.
- Remove unnecessary comments in generated source.
2022-01-21 01:08:36 -05:00
Justin Hileman 076209772d Explicitly treat null as an empty string when interpolating.
Fixes a deprecation warning on PHP 8.1+, and saves us some unnecessary escaping calls!

Thanks for your help @scr4bble :)

Fixes #383
2022-01-21 00:47:28 -05:00
Justin Hileman 7fd191f730 Remove unused variable. 2022-01-21 00:38:13 -05:00
Justin Hileman e7165a33b2 Only check for mbstring.func_overload in < PHP 8.x
Fixes #385
2022-01-07 21:35:06 -05:00
Justin Hileman 26c8a448fc Fix PHP 8.1 deprecation warning when user lambdas do not return a string
Fixes #382
2021-12-21 23:11:27 -05:00
Justin Hileman 4e2724dd40 Merge branch 'release/2.14.0' 2021-12-14 09:42:17 -05:00
Justin Hileman 3ce0ee0ec1 Bump to v2.14.0, bump spec version to 1.2.2 2021-12-14 09:42:05 -05:00
Justin Hileman 63616440f7 Merge pull request #380 from schlessera/fix/trim-php-8.1
Avoid using trim() on null
2021-12-12 22:13:34 -05:00
Justin Hileman d6340c85ef Update readme link
Fixes #377
2021-12-12 21:52:12 -05:00
Justin Hileman 1a125dfe25 Brevity. 2021-12-12 21:51:06 -05:00
Justin Hileman fc91860ffa Merge pull request #376 from samizdam/patch-1
Update README.md
2021-12-12 21:44:18 -05:00
Alain Schlesser 10a6c7ce52 Add tests 2021-12-12 08:51:15 -05:00
Alain Schlesser 09adfdec76 Ensure $delimiters is a string before trimming 2021-12-12 08:51:03 -05:00
Alain Schlesser d5499fc8fc Avoid using trim() on null 2021-12-09 15:25:30 -05:00
Justin Hileman 3a65e8adf3 Run spec inheritance tests. 2021-12-07 16:19:05 -05:00
Justin Hileman 87cfdabec8 Updating to mustache spec v1.2.2 2021-12-07 16:16:46 -05:00
samizdam d819f0379c Update README.md
Fix mustache home page link.
2021-09-12 10:49:03 +03:00
Justin Hileman db2bc776c4 Add missing setLogger to Mustache_Cache interface.
Fixes #358
2021-04-28 10:48:42 -07:00
Justin Hileman 799c0f40fd Throw a Mustachey runtime exception from filesystem source.
Fixes #370
2021-04-28 10:25:13 -07:00
Justin Hileman d2503c7a29 Merge pull request #343 from Rarst/patch-1
Adjusted log level argument type
2021-04-28 10:21:12 -07:00
Justin Hileman bbdf0aeabf Merge pull request #365 from fezfez/patch-1
Add .gitattributes
2021-01-30 11:44:16 -08:00
Stéphane 7221178da7 Add .gitattributes 2020-11-27 19:57:43 +01:00
Justin Hileman 5ec3021ab9 Merge pull request #354 from Kirill89/master
Add security recommendation to README.md
2020-03-21 10:11:37 -07:00
Kirill Efimov e0a45d926b Add security recommendation to README.md (fixes #353) 2019-11-29 08:38:09 +02:00
Justin Hileman e95c5a008c Merge branch 'release/2.13.0' 2019-11-23 13:40:31 -08:00
Justin Hileman 819a3e1e46 Bump to v2.13.0 2019-11-23 13:38:47 -08:00
Justin Hileman 397a47ec4e Merge branch 'Ennexa-master' into dev 2019-11-23 10:52:12 -08:00
Justin Hileman a04f70e8b5 Let 7.4 snapshot fail for now 2019-11-23 10:51:33 -08:00
Joyce Babu 6d28b0b28d Prevent array access on null value
Fix 'Trying to access array offset on value of type null' notice on PHP
7.4
2019-11-23 10:45:55 -08:00
Justin Hileman 778906301c Moar PHPs! 2019-11-23 10:31:10 -08:00
Justin Hileman 916b13e060 Fix PHP 5.4 and 5.5 on CI 2019-11-23 10:28:42 -08:00
Justin Hileman 4c28410c3a Let HHVM fail /shrug 2019-07-21 22:34:20 -07:00
Justin Hileman 72d07520ec Improve Tokenizer::scan performance by 98.2%.
- Checking the first character of the opening and closing tags is >90% faster than baseline for my test case.
- Inlining the `tagChange` method is 18% faster than baseline.
- Together they yield a 98.2% wall clock time improvement!

Hat tip to @sam-osborne for the first one :)

https://github.com/mardix/Handlebars/pull/6
2019-07-21 16:02:17 -07:00
Justin Hileman bbb43caa1a Fix delimiter parse error, and throw a syntax error when invalid.
The mustache spec has a test case that _should_ have caught this:

https://github.com/mustache/spec/blob/master/specs/delimiters.yml#L154-L158

... But that test case only tests that an engine recognizes it as a delimiter change tag, not that it ends up changing to the correct delimiters. In our case, we were incorrectly changing to `@` and ` `.

The only "invalid" case I can think of is missing delimiters, which is how that spec test was (incorrectly) parsed. Now it'll enforce that it's always called with *something* that can be used as a delimiter.
2019-07-21 16:02:17 -07:00
Andrey Savchenko bfb6d7732e Adjusted log level argument type. 2018-11-30 17:45:52 +02:00
Justin Hileman 8e77785883 Merge pull request #333 from Enalean/php-7.2
Run tests against PHP 7.2 on Travis CI
2017-12-08 09:34:05 -08:00