summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/tplcontext_test.go
AgeCommit message (Collapse)Author
2021-10-16fileserver: Fix compression breaks using httpInclude (#4352) (#4358)Y.Horie
2021-09-29Move from deprecated ioutil to os and io packages (#4364)KallyDev
2021-09-20templates: Add tests for funcInclude and funcImport (#4357)Tim Culverhouse
* Update tplcontext.go Add {{ render "/path/to/file.ext" $data }} via funcRender * Update tplcontext.go * Refactor funcInclude, add funcImport to enable {{block}} and {{template}} * Fix funcImport return of nil showing up in html * Update godocs for and * Add tests for funcInclude * Add tests for funcImport * os.RemoveAll -> os.Remove for TestFuncInclude and TestFuncImport
2021-04-30fileserver: Share template logic for both `templates` and `file_server ↵Jason Du
browse` (#4093) Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-07-31admin,templates,core: Minor enhancements and error handling (#3607)Bart
* fix 2 possible bugs * handle unhandled errors
2020-07-08templates: Fix front matter closing fence searchMatthew Holt
This makes it choose first matching closing fence instead of last one, which could appear in document body.
2020-06-15templates: Add support for dots to close yaml frontmatter (#3498)Francis Lavoie
* templates: Add support for dots to close yaml frontmatter * templates: Fix regression in body output
2020-05-18templates: trim windows whitespace in SplitFrontMatter; fix #3386 (#3387)Thorkild Gregersen
* add test case for SplitFrontMatter showing issue with windows newline * fix issue with windows newline when using SplitFrontMatter * Update modules/caddyhttp/templates/frontmatter.go Co-authored-by: Francis Lavoie <lavofr@gmail.com> * make it mere explicit what is trimmed from firstLine * Update modules/caddyhttp/templates/frontmatter.go Co-authored-by: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-04-06templates: Use text/template; add experimental notice to docsMatthew Holt
Using html/template.HTML like we were doing before caused nested include to be HTML-escaped, which breaks sites. Now we do not escape any of the output; template input is usually trusted, and if it's not, users should employ escaping actions within their templates to keep it safe. The docs already said this.
2019-12-23templates: Change functions, add front matter support, better markdownMatthew Holt
2019-06-30Add licenseMatthew Holt
2019-06-27Use html/template for escaping by defaultMatthew Holt
Allow HTML only with a few specific functions
2019-06-21OopsMatthew Holt
2019-06-18templates: Remove context functions implemented by sprigMatthew Holt
2019-06-18Implement templates handler; various minor cleanups and bug fixesMatthew Holt