smartinsightsfromdata/rpivotTable

Provide option to escape html

Opened this issue · 3 comments

R packages that can be used in Shiny typically provide simple methods of escaping html. For example, in rHandsonTable, kable, rFullCalendar you simply set a escape flag to true or false. Please provide an option to escape html in rPivotTable.
Thank you.

Example:

df <- data.frame(Col1 = c("<b>Cat</b>","Dog","<b>Ferret</b>"), Col2 = c(1,2,3), Col3 = c("a","b","b"))

rpivotTable(df,rows = c("Col2"),cols = c("Col3"),vals = "Col1",aggregatorName = "Last",rendererName = "Table")

The underlying Javascript library doesn’t allow this, so the htmlwidget will not be able to do much here.

The underlying Javascript library doesn’t allow this, so the htmlwidget will not be able to do much here.

Thank you for a quick response. Are there any workarounds?

The HTML output is reasonably clean and well-annotated with CSS classes so you may be able to use CSS to style certain parts of the table.