I've been working with the pending D7 version of ffpc described here, and all is mostly well. However, podcasts whose titles have apostrophes in them are showing up as entities, e.g. "Joe's Test Podcast". I looked through the code to see if I could find the right place to fix this, but without luck. Does anyone have any suggestions? Thanks!

Comments

jim_at_miramontes’s picture

A slight update:

I defined a title for a podcast like "Joe's Test Podcast". When I look at the content of $vars['rows'] in template_preprocess_ffpc_view_podcast_feed, the title is showing up as <title>Joe&amp;#039;s Test Podcast</title>. That is, the apostrophe has been sorta double-encoded: the apostrophe has been turned into an entity, and the ampersand at the beginning of the entity has also been encoded.

So, I modified template_preprocess_ffpc_view_podcast_feed to, at the very beginning of the function, do this:
$vars['rows'] = html_entity_decode(html_entity_decode($vars['rows'], ENT_QUOTES), ENT_QUOTES);
This is giving me what I want -- a TITLE tag with "Joe's Test Podcast" -- and nothing else in the podcast XML seems to be corrupted. But I sure don't feel like I'm working from a very principled basis of what's going on in the code -- it's a hack, and nothing else.

Still, it's giving me what I want/need. Can anyone offer any wisdom here?