Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML misinterpreted as code in selfcontained mode #257

Closed
cpsievert opened this issue Feb 2, 2017 · 0 comments · Fixed by #401
Closed

HTML misinterpreted as code in selfcontained mode #257

cpsievert opened this issue Feb 2, 2017 · 0 comments · Fixed by #401

Comments

@cpsievert
Copy link
Collaborator

cpsievert commented Feb 2, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant