I've created an app that pulls pages from WordPress, and it works great. However, I'm now trying to save the data to localstorage, to ensure that the user can read the last up-to-date content even when they have limited internet.
The postTitle and postDate are fine, but the postContent is appearing as raw html.
When I have an internet connection and the data is pulled directly from the website by invoking a JSON service, there is no problem. But if I cut the internet and so populate the page with the data that was earlier storage in localstorage, then the post content appears as raw html.
What do I need to do to ensure that the html displays correctly?
This is the javascript I running on page load:
var welcomeTitle = localStorage.getItem('welcomeTitle');
var welcomeContent = localStorage.getItem('welcomeContent');
var welcomeDate = localStorage.getItem('welcomeDate');
Appery('postTitle').text(welcomeTitle);
Appery('postContent').text(welcomeContent);
Appery('postDate').text(welcomeDate);
Here's a screen shot of my data mapping: