library(testit)
assert(
'escape_latex() sanitizes backslashes and {}',
escape_latex('\\') == '\\textbackslash{}',
escape_latex('\\{}') == '\\textbackslash{}\\{\\}',
escape_latex('{\\}') == '\\{\\textbackslash{}\\}',
escape_latex('~!@#$%^&*()') == '~!@#$%^&*()'
)
assert(
'escape_html() escapes HTML chars',
escape_html('&"<>') == '&"<>',
escape_html('~!@#$%^&*()') == '~!@#$%^&*()'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.