0

I'm using the reddit API to build an android reddit client. I send a GET to https://www.reddit.com/r/leagueoflegends/top/.json and get back the top posts, each with a selftext_html string. I then try to load the selftext_html onto an android WebView using webView.loadData(selftext_html, "text/html", null).

However, the html string always displays as plaintext. The online reddit repo says this about selftext_html:

"NOTE: The HTML string will be escaped. You must unescape to get the raw HTML. Null if not present."

I tried unescaping the string using Html.escapeHtml() and several other methods, but it still displays as plaintext. Any help is appreciated. Thanks!

Hemant Parmar
  • 3,924
  • 7
  • 25
  • 49

0 Answers0