{"action":"opened","issue":{"url":"https://api.github.com/repos/janl/mustache.js/issues/676","repository_url":"https://api.github.com/repos/janl/mustache.js","labels_url":"https://api.github.com/repos/janl/mustache.js/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/janl/mustache.js/issues/676/comments","events_url":"https://api.github.com/repos/janl/mustache.js/issues/676/events","html_url":"https://github.com/janl/mustache.js/issues/676","id":358696322,"node_id":"MDU6SXNzdWUzNTg2OTYzMjI=","number":676,"title":"Escape result of function","user":{"login":"python2and3developer","id":33635496,"node_id":"MDQ6VXNlcjMzNjM1NDk2","avatar_url":"https://avatars0.githubusercontent.com/u/33635496?v=4","gravatar_id":"","url":"https://api.github.com/users/python2and3developer","html_url":"https://github.com/python2and3developer","followers_url":"https://api.github.com/users/python2and3developer/followers","following_url":"https://api.github.com/users/python2and3developer/following{/other_user}","gists_url":"https://api.github.com/users/python2and3developer/gists{/gist_id}","starred_url":"https://api.github.com/users/python2and3developer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python2and3developer/subscriptions","organizations_url":"https://api.github.com/users/python2and3developer/orgs","repos_url":"https://api.github.com/users/python2and3developer/repos","events_url":"https://api.github.com/users/python2and3developer/events{/privacy}","received_events_url":"https://api.github.com/users/python2and3developer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-10T16:19:52Z","updated_at":"2018-09-10T16:19:52Z","closed_at":null,"author_association":"NONE","body":"I would be nice to provide an option to escape the result of a function inside a block. Example\r\n```\r\nMustache.render(\"{{#someFunction}}someValue{{/someFunction}}\", {\r\n  someFunction : function () {\r\n      return function(val, render) {\r\n        return \"<b>this is not escaped</b>\" + render(val);\r\n      };\r\n    }\r\n});\r\n```\r\nThis returns: `<b>this is not escaped</b>someValue`.\r\nThe idea is to provide an option to escape the last result. This way the user is forced to use logic less templates. Because the function can include some logic for rendering HTML this way, instead of delegating the process of writing HTML to the template.\r\n\r\n"}}
{"actor":{"display_login":"python2and3developer"}}