Skip to content

tags$head() not respected #2475

@daattali

Description

@daattali

This is a sub-issue of #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviornextto consider for next releasetheme: htmltoolsRelated to htmltools

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions