rstudio / htmltools

Tools for HTML generation and output
https://rstudio.github.io/htmltools/
215 stars 68 forks source link

Should `HTML()` cast factors to character? #299

Open gadenbuie opened 2 years ago

gadenbuie commented 2 years ago

It's pretty easy to end up with an errant factor (hello stringsAsFactors) and end up with some unexpected HTML.

htmltools::HTML(factor("one"))
#> 1
htmltools::HTML(factor("one"), "two")
#> 1 two
htmltools::HTML("one", factor("two"))
#> one 1