🔍 An RStudio addin slash regex utility belt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
354B

  1. #' @importFrom dplyr "%>%" mutate filter group_by summarize select
  2. #' @importFrom utils getFromNamespace
  3. NULL
  4. escape_html <- function(x) {
  5. x = gsub("&", "&amp;", x)
  6. x = gsub("<", "&lt;", x)
  7. x = gsub(">", "&gt;", x)
  8. x = gsub("\"", "&quot;", x)
  9. x = gsub(" ", "&nbsp;", x)
  10. x
  11. }
  12. escape_backslash <- function(x) {
  13. gsub("\\\\", "\\\\\\\\", x)
  14. }