Skip to content

HTML misinterpreted as code in selfcontained mode #257

@cpsievert

Description

@cpsievert

The children of a nested HTML tag gets rendered as code instead of literal HTML when using prependContent() and saveWidget(..., selfcontained = T)

library(htmltools)
library(htmlwidgets)

one <- tags$div("Some text")
two <- tags$div(one)
p <- prependContent(leaflet::leaflet(), two)
saveWidget(p, "index.html")

screen shot 2017-02-02 at 5 45 20 pm

Interestingly enough this same example works as expected when selfcontained = FALSE

saveWidget(p, "index.html", selfcontained = FALSE)

# this also works
p <- prependContent(leaflet::leaflet(), one)
saveWidget(p, "index.html")

So, perhaps this is a pandoc issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions