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

escape code when embed in case of html entities #228

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Jul 28, 2019

This fixes #227

If source_code: embed, the code part is HTML escaped using htmltools::htmlEscape before being included in pre and code tag.
As Rmarkdown code could be composed of some html code too, this is useful so that pandoc does not try to interpret as html and throw an error.

I did not add tests as I am not sure what the way to do it here (only one test file)


This change is Reviewable

@cpsievert cpsievert merged commit 64292c3 into rstudio:master Feb 11, 2021
@cpsievert
Copy link
Collaborator

Thanks @cderv!

@cderv cderv deleted the escape-html branch February 11, 2021 16:56
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 this pull request may close these issues.

"source_code: embed" produces error when concatening strings containing html code
3 participants