yixuan/prettydoc

html templates should not have xmlns attribute in html tag

Closed this issue · 1 comments

grady commented

The html templates in this project suffer the same problem mentioned in these rmarkdown issues:
rstudio/rmarkdown#1640 rstudio/rmarkdown#995

Namely, the output is not valid XHTML, and using a strict XML parser will result in an error. They are valid HTML5.

The <html> tags include a xmlns attribute, which wrongly declares the file to be XML. In certain real-world cases (see rstudio/rmarkdown#1640) this can cause a parser error to be displayed in a browser instead of the document.

The xmlns attribute should be deleted from the html templates to remove this issue, as was done here:
rstudio/rmarkdown@41d8ae4

Thanks. I guess this happened for the hpstr or leonids theme, as the other three have been updated recently. I just added a patch to remove those tags.