Reputation: 402
When I try to load url everything works fine. I also tried to load normal HTML
and that worked fine too.
But this html I got from API is so weird and without tags. Is it possible to somehow present this in webView?
This is how my HTML looks like:
Code to load it :
var html: String
html = cards[Int(slider.value)-1].content
print(html)
webView.loadHTMLString(html, baseURL: nil)
Upvotes: 0
Views: 208
Reputation: 20682
The API is returning the data URL-encoded. So you have two options:
NSString.removingPercentEncoding
.Upvotes: 2