问题
Below code used to work well till I upgraded my shiny. Now it just prints out the html text. Does not render it as html
ui.R
dataTableOutput("grid")
server.R
testLinks<-function(){
serial<-(1:2)
websites<-c("www.google.com","www.yahoo.com")
Link<-paste0("<a href=\"",websites,"\" target=\"_blank\">", websites,"</a>")
df<-data.frame(serial, websites,Link)
df
}
output$grid<-renderDataTable(testLinks())
Now it just renders the links as html text
Before the upgrade, it uses to render them as html links.
Any help, greatly appreciated.
回答1:
The escape argument in renderDataTable needs to be set to FALSE. I am assuming the default has been changed in this release. Causing my code to break. This has been fixed, by explicitly setting escape paramater to FALSE.
来源:https://stackoverflow.com/questions/28269585/in-latest-shiny-html-rendering-code-breaks-in-renderdatatable