For more info and usage examples see the README on the infuser
github page.
To help prevent SQL injection attacks (or other injection attacks), use a transformation function to escape special characters and provide it through the transform_function
argument. build_sql
is a great default escaping function for SQL templating. For templating in other languages you will need to build/specify your own escaping function.
1 2 3 4 5 6 |
file_or_string |
the template file or a character string containing the template |
... |
different keys with related values, used to fill in the template (if first passed item is a list/environment the contents of this will be processed instead) |
variable_identifier |
the opening and closing character that denounce a variable in the template, defaults to |
default_char |
the character use to specify a default after |
collapse_char |
the character used to collapse a supplied vector |
transform_function |
a function through which all specified values are passed, can be used to make inputs safe(r). dplyr::build_sql is a good default for SQL templating. |
verbose |
verbosity level |
simple_character |
if |
strict |
if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.