View source: R/htmlspecialchars.R
| htmlspecialchars | R Documentation |
The characters c("&", '"', "'", "<", ">") will be replaced with
c("&", """, "'", "<", ">"), respectively.
htmlspecialchars(string)
string |
the string with (or w/o) HTML special chars |
the string with special chars replaced.
Yihui Xie <https://yihui.org>
https://www.php.net/manual/en/function.htmlspecialchars.php
gsub
htmlspecialchars("<a href = 'https://yihui.org'>Yihui</a>")
# <a href = 'https://yihui.org'>Yihui</a>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.