Skip to content

Commit

Permalink
fixed escaping of special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Feb 25, 2022
1 parent 3b80ea6 commit f3d3bdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(make_tree)
export(searchTreeview)
export(treecheckInput)
export(treeviewInput)
importFrom(htmltools,HTML)
importFrom(htmltools,htmlDependencies)
importFrom(htmltools,htmlDependency)
importFrom(htmltools,tags)
Expand Down
4 changes: 2 additions & 2 deletions R/input-treecheck.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @return Server-side: A `character` value or a `list` depending on the `return_value` argument.
#' @export
#'
#' @importFrom htmltools tags validateCssUnit htmlDependencies
#' @importFrom htmltools tags validateCssUnit htmlDependencies HTML
#' @importFrom shiny icon restoreInput
#' @importFrom jsonlite toJSON
#'
Expand Down Expand Up @@ -55,7 +55,7 @@ treecheckInput <- function(inputId,
`data-return` = return_value,
tags$script(
type = "application/json", `data-for` = inputId,
jsonlite::toJSON(options, auto_unbox = TRUE, json_verbatim = TRUE)
HTML(jsonlite::toJSON(options, auto_unbox = TRUE, json_verbatim = TRUE))
)
),
html_dependency_treeview(),
Expand Down
4 changes: 2 additions & 2 deletions R/input-treeview.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @return Server-side: A \code{character} value or a \code{list} depending on the \code{return_value} argument.
#' @export
#'
#' @importFrom htmltools tags validateCssUnit
#' @importFrom htmltools tags validateCssUnit HTML
#' @importFrom jsonlite toJSON
#' @importFrom shiny restoreInput
#'
Expand Down Expand Up @@ -63,7 +63,7 @@ treeviewInput <- function(inputId,
`data-return` = return_value,
tags$script(
type = "application/json", `data-for` = inputId,
jsonlite::toJSON(options, auto_unbox = TRUE, json_verbatim = TRUE)
HTML(jsonlite::toJSON(options, auto_unbox = TRUE, json_verbatim = TRUE))
)
),
html_dependency_treeview()
Expand Down

0 comments on commit f3d3bdd

Please sign in to comment.