Skip to content

Commit ea407fb

Browse files
committed
Don't include xtable comment in renderTable by default
1 parent 8591e4f commit ea407fb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ shiny 1.0.3.9001
2525

2626
* Added new `snapshotPreprocess()` function, which is used for preprocessing output values before taking a test snapshot. ([#1760](https://github.com/rstudio/shiny/pull/1760))
2727

28+
* The HTML generated by `renderTable()` no longer includes comments with the R version, xtable version, and timestamp. ([#1771](https://github.com/rstudio/shiny/pull/1771))
29+
2830
### Bug fixes
2931

3032
* Fixed [#1546](https://github.com/rstudio/shiny/issues/1546): make it possible (without any hacks) to write arbitrary data into a module's `session$userData` (which is exactly the same environment as the parent's `session$userData`). To be clear, it allows something like `session$userData$x <- TRUE`, but not something like `session$userData <- TRUE` (that is not allowed in any context, whether you're in the main app, or in a module) ([#1732](https://github.com/rstudio/shiny/pull/1732)).

R/render-table.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ renderTable <- function(expr, striped = FALSE, hover = FALSE,
176176
else ""
177177
}, " ",
178178
"class = '", htmlEscape(classNames, TRUE), "' ",
179-
"style = 'width:", validateCssUnit(width), ";'"))
179+
"style = 'width:", validateCssUnit(width), ";'"),
180+
comment = {
181+
if ("comment" %in% names(dots)) dots$comment
182+
else FALSE
183+
}
184+
)
180185

181186
print_args <- c(print_args, non_xtable_args)
182187
print_args <- print_args[unique(names(print_args))]

0 commit comments

Comments
 (0)