-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a echo func that could be use in {% %} #28
Conversation
@cuiweixie, thank you! I need to think about this a little bit because I do think that it would be better if it just worked with the normal output functions, but I'm not sure if there is easy way around it. But lets keep this open for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if echo
accepted ...
as an input.
@cuiweixie, What do you think, should we also have function that does automatic HTML escaping? |
like template.escape func? why not use template.escape? |
@cuiweixie, I am preparing for |
### Added - Support for `template.new()` and `template.new(options)` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()` and `template.new(options)` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()` and `template.new(options)` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()` and `template.new(options)` - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()` and `template.new(options)` - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()` and `template.new(options)` - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function` (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function` (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function` (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function` (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function` (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
### Added - Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (#36) ### Changed - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (#32) ### Fixed - Wrong template returned when using multiple server blocks (#25) - Add a pure lua configure method (#23, #7)
* add echo function like php * add tostring * echo accept ... as arg
- Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (bungle#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (bungle#36) - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (bungle#32) - Wrong template returned when using multiple server blocks (bungle#25) - Add a pure lua configure method (bungle#23, #7)
- Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (bungle#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (bungle#36) - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (bungle#32) - Wrong template returned when using multiple server blocks (bungle#25) - Add a pure lua configure method (bungle#23, #7)
- Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (bungle#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (bungle#36) - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (bungle#32) - Wrong template returned when using multiple server blocks (bungle#25) - Add a pure lua configure method (bungle#23, #7)
* add echo function like php * add tostring * echo accept ... as arg
- Support for `template.new()`, `template.new(options)` and `template.new(safe)` (a `boolean`) - Added `safe` implementation `require "resty.template.safe"` - Added `echo` helper function to template (bungle#28) - Added `template.load_file` and `template.load_string` functions - Added `template.compile_file` and `template.compile_string` functions - Added `template.parse_file` and `template.parse_string` functions - Added `template.render_file` and `template.render_string` functions - Added `template.precompile_file` and `template.precompile_string` functions - Added `template.process`, `template.process_file` and `template.process_string` functions - Added `template.root` and `template.location` properties - Added `template.visit` function (bungle#36) - When `plain` equals to `false` the file io issues are considered fatal, and assertions are thrown (bungle#32) - Wrong template returned when using multiple server blocks (bungle#25) - Add a pure lua configure method (bungle#23, #7)
No description provided.