humanmade/Custom-Meta-Boxes — pull request #169 by mattheu (2014-02-23 18:19:00+00:00)
Title: Do not html encode json response

Post titles with special characters are not handled nicely by select2. This is because we are using `get_the_title`, which returns an encoded string.

In #145 @brodkin reported this issue and provided a solution that used `$post->title` directly.

However I think I would prefer to continue using get_the_title. I think it is OK just to use `html_entity_decode` as this should then be properly escaped by `json_encode`

Also I updated some code to avoid creating JSON manually.

Would be good to get a second opinon on whether this or #145 is a better solution. cc @joehoyle