Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Special characters in virtualSelectInput #696

Closed
JerePlum99 opened this issue May 16, 2024 · 2 comments
Closed

Bug: Special characters in virtualSelectInput #696

JerePlum99 opened this issue May 16, 2024 · 2 comments

Comments

@JerePlum99
Copy link

Appreciate all the work being done here! Similar to #6 it appears that special characters, at least "&" is rendering incorrectly within the virtualSelectInput - likely due to an HTML escaping issue.

Let me know if you need anything else!

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  tags$h2("Virtual Select"),
  
  fluidRow(
    column(
      width = 4,
      virtualSelectInput(
        inputId = "multiple",
        label = "Multiple select:",
        choices = c("Example & Error", "Normal Behavior"),
        multiple = TRUE
      )
    ),
    column(
      width = 4,
      
      tags$b("Multiple select :"),
      verbatimTextOutput("res_multiple"),
      tags$b("Is virtual select open ?"),
      verbatimTextOutput(outputId = "res_multiple_open"),
    )
  )
  
  
)

server <- function(input, output, session) {
  
  output$res_multiple <- renderPrint(input$multiple)
  output$res_multiple_open <- renderPrint(input$multiple_open)
  
}

shinyApp(ui = ui, server = server)
@pvictor
Copy link
Member

pvictor commented May 17, 2024

I think you can use html = TRUE for fixing the problem.

@JerePlum99
Copy link
Author

@pvictor Ahhh you are correct, my oversight. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants