coatless / quarto-webr

Community developed Quarto Extension to Embed webR for HTML Documents, RevealJS, Websites, Blogs, and Books.
https://quarto-webr.thecoatlessprofessor.com/
395 stars 19 forks source link

Escape HTML output characters generated by R code output #116

Closed coatless closed 11 months ago

coatless commented 11 months ago

This PR adds a JavaScript function that escapes HTML characters that may be contained within the R output. The characters being escaped alongside the new values are given in the following table:

Original Escaped
& &
< &lt;
> &gt;
" &quot;
' &#039;

Thus, we now have:

qwebr-escaped-html-entities

Close #115