Not html encode content in shorttag when posting R Markdown to WordPress

A small R Markdown file:

Test post to wordpress

```{r testing, eval=FALSE}
library(RWordPress)
library(knitr)
options(WordPressLogin = c(<your username> = '<your password>'),
  WordPressURL = 'http://www.research.relund.dk/wp/xmlrpc.php')
knit2wp('test.Rmd', title = 'Test Publishing R markdown to WordPress with pre', categories = 'R', publish=T )
knit2wp('test.Rmd', title = 'Test Publishing R markdown to WordPress with shortcode', shortcode=c(T,T), categories = 'R', publish=T )
```

becomes these two posts. In the first post the code is not recognized by the syntax highlighter plugin. In the second the html encoded characters is shown. Is there a way to not html encode between the shortcode tags so the second post will look okay?

Related posts

Leave a Reply

1 comment