powered by
This escapes a string for LaTeX, HTML or RTF.
sanitize(str, type = c("latex", "html", "rtf"))
The sanitized character object.
A character object.
"latex", "html" or "rtf".
"latex"
"html"
"rtf"
HTML and LaTeX code was copied over from xtable::sanitize().
xtable::sanitize()
txt <- "Make $$$ with us" sanitize(txt, type = "latex")
Run the code above in your browser using DataLab