Escape problematic characters to allow display in HTML
Copied from knitr for internal use because it is unexported and CRAN rejects :::
knitr
escape_html(x)
x
Useful links