powered by
The characters c("&", '"', "'", "<", ">") will be replaced with c("&", """, "'", "<", ">"), respectively.
c("&", '"', "'", "<", ">")
c("&", """, "'", "<", ">")
htmlspecialchars(string)
the string with (or w/o) HTML special chars
the string with special chars replaced.
https://www.php.net/manual/en/function.htmlspecialchars.php
gsub
# NOT RUN { htmlspecialchars("<a href = 'https://yihui.org'>Yihui</a>") # <a href = 'https://yihui.org'>Yihui</a> # }
Run the code above in your browser using DataLab