字符串中的“与”符号 (&) 变为“&” 在串扰filter_select()函数中

Pau*_*ney 5 r shiny crosstalk reactable

我在使用可反应表的 r闪亮应用程序的串扰 filter_select() 函数中使用 NFL 体育场名称。然而,当我选择“M&T Bank Stadium”时,它显示为“M&[amp;]T Bank Stadium”(我添加了括号,以便您看到它的样子)。有没有办法让串扰过滤器选择显示“M&T 银行体育场”而不是“M&[amp;]T 银行体育场”?

我在下面做了一个快速 MRE

library(reactable)
library(tidyverse)
library(crosstalk)
library(shiny)

df <- tibble(points = c(10, 12, 14), 
             stadium = c("M&T Bank Stadium", "Wembley Stadium", "FirstBank Stadium"))

df_crosstalk <- SharedData$new(df)

df_react <- 
  reactable(df_crosstalk)

ui <- fluidPage(
  titlePanel("Test Ampersand"),
  fluidRow(
    column(
      4,
      filter_select(
        id = "stadium",
        label = "Stadium",
        sharedData = df_crosstalk,
        group = ~`stadium`)
      ),
    column(
      8,
      df_react
    )
  )
)

server <- function(input, output, session) {
  output$table <- renderReactable({
    df_react
  })
}

shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)

Pau*_*ney 0

对于遇到相同问题的任何人,此问题已在此处修复:github.com/rstudio/crosstalk/issues/87