context("UI")
test_that("selectInput options are properly escaped", {
si <- selectInput("quote", "Quote", list(
"\"Separators\"" = list(
"None" = "",
"Double quote" = "\"",
"Single quote" = "'"
)
))
si_str <- as.character(si)
expect_true(any(grepl("<option value=\""\">", si_str, fixed = TRUE)))
expect_true(any(grepl("<option value=\"'\">", si_str, fixed = TRUE)))
expect_true(any(grepl("<optgroup label=\""Separators"\">", si_str, fixed = TRUE)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.