i'm using an ng-repeat directive to show a list of posts, retrieved through a wordpress-json-api.
i have problems with some characters, as the output of wp-json-api escapes some of them.
myjson :
{
"id": 1,
"type": "mynicetype",
"slug": "myniceslug",
"title": "It’s a strange char" //my apostrophe got changed
... }
and my markup:
<li ng-repeat="post in menu.posts | filter:searchText | filter:query" >
<h4 >name : {{post.title}}</h4>
</li>
get rendered (obviously-awfully) as
name : It’s a strange char
What's the best approach for formatting these html numbers? (before assigning the json.success data to the scope or, more easily, on the fly, inside template? but how?)
(btw i don't get the reason why an apostrophe should receive a special treatment by a json-api, but i could really be misunderstanding something here)
Thanks for any clarification