Logicless templating
Logicless templating
whisker.render(template, data = parent.frame(), partials = list(), debug = FALSE, strict = TRUE)
template |
|
data |
named |
partials |
named |
debug |
Used for debugging purposes, likely to disappear |
strict |
|
character
with rendered template
By default whisker applies html escaping on the generated text. To prevent this use {{{variable}}} (triple) in stead of {{variable}}.
template <- "Hello {{place}}!" place <- "World" whisker.render(template) # to prevent html escaping use triple {{{}}} template <- "I'm escaped: {{name}} And I'm not: {{{name}}}" data <- list( name = '<My Name="Nescio&">') whisker.render(template, data) # I'm escaped: <My Name="Nescio&"> # And I'm not: <My Name="Nescio&">
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.