yihui / knitr

A general-purpose tool for dynamic report generation in R
https://yihui.org/knitr/
2.36k stars 873 forks source link

Fix fig.alt escaping for HTML outputs #2291

Closed cderv closed 9 months ago

cderv commented 9 months ago

Following #2269 correctly escape fig.alt for md output

This closes #2290

Should we maybe xfun::strip_html() an alt text ? Or leave that to the user to not provide html tags ?

Note that escaping works to avoid issue, but pass the tags through.