rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

tags$head() not respected

Open daattali opened this issue 2 years ago • 0 comments

This is a sub-issue of https://github.com/rstudio/rmarkdown/issues/1842

I've come across this issue many times over the years and only yesterday decided to open an issue, but under shiny

Here is the example that @jcheng5 provided:

I'd expect this to alert, and for the script tag to be in the

, but it doesn't do anything.
---
output: html_document
---

```{r echo=FALSE}
library(htmltools)
```
```{r}
tagList(tags$head(tags$script('alert("hi");')))
```

Or you can see my issue in shiny for another example

daattali avatar Apr 18 '23 19:04 daattali