wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
338 stars 129 forks source link

Title not rendered / encoded correctly #167

Closed Suplanus closed 5 years ago

Suplanus commented 5 years ago

If i get the posts of this page there are titles like „SKYLINE GREEN“ RUNDET SAMSTAGSPROGRAMM AB which are not encoded correctly. In Title.Rendered I get „Skyline Green“ rundet Samstagsprogramm ab.

This is my workaround:

var title = WebUtility.HtmlDecode(post.Title.Rendered);

Thanks for the great library! Rock on!

ThomasPe commented 5 years ago

The API will always return the encoded version to prevent the JSON from getting broken. I guess this is more of a design discussion than a bug. What do the users expect the library to do with the data returned from the API?

For now I would do as little transformations to the data as possible until / unless there are a lot of requests to change something.