如何获得要渲染的字符实体(PHP从数据库中提取以在Fullcalendar中显示)


How do I get character entities to render (PHP pulling from database to display in Fullcalendar)?

我使用PHP从Wordpress(WP_Query())中提取帖子以生成Fullcalendar事件字符串。除了帖子标题字段中的字符实体(特别是撇号)(作为撇号)外,所有的工作都在网页上显示为"’"。我想可能某个地方正在进行双重解码,所以我尝试通过html_entity_decode()htmlspecialchars_decode()运行变量,但没有成功。谢谢你的帮助!

<?php 
$the_film = ': '.strtoupper(get_the_title($filmID));
...
echo '{"id":"'.get_the_ID().'","title":"'.$the_city.$the_film.'","start":"'.$start.'","color":"'.$color.'","textColor":"'.$textColor.'","url":"'.$filmlink.'","moderator":"'.$moderator.'","guest":"'.$guest.'"},';
 ?>

谢谢你的推动,Henrique。事实证明你对我的信任是值得的。我把事情搞得一团糟,因为我在渲染FC事件时使用了.text()而不是.html(),所以角色实体没有被解码。