-
Notifications
You must be signed in to change notification settings - Fork 13
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
Mustache Escaping Flag #180
base: master
Are you sure you want to change the base?
Mustache Escaping Flag #180
Conversation
…cial characters is performed or not.
@@ -12,12 +12,19 @@ | |||
* Returns the resulting string. |
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.
Its not necessary to update the docs/
markdown files, can you instead add the changes to this doc comment, I use these to generate the markdown files on each release.
@@ -614,9 +614,11 @@ This function has been removed. The dependency that makes this function work is | |||
You can continue using the function by manually installing the [`files_scripts_deprecated`](https://github.com/Raudius/files_scripts_deprecated) app, which bundles all the removed functions. | |||
### mustache | |||
|
|||
`mustache(String template, [Table variables]={}): String` | |||
`mustache(String template, [Table variables]={}, [Bool escape]=true): String` |
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.
The default value is actually false
Also see other change request; you should leave this file unchanged and just make the docs changes directly in the class file comment.
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.
Oh yep, I think copilot did that and I uncommitted and recommitted. Maybe my force push didn't go through, I hate git. But it should default to true to preserve existing behaviour. Anyway, only added a couple of lines so feel free to add it in your master branch however you want if it's something you'd like to add :)
Add boolean parameter to mustache to control whether escaping of special characters is performed or not.
I am working with plain files, YAML, etc., and the HTML escaping that the Mustache_Engine is set up with causes problems here.
It might be desirable to expose further finetuning instead of making it a boolean, leave that up to you.
I've done basic tests but not written any testcases etc.