Not sure if this is an AF bug or a core one yet. Just noticed on my site that the apostrophe is getting encoded, which is usually a sign of double check_plain'ing.

Michelle

Comments

Freshy88’s picture

Hey Michelle,

This actually appears to be affecting 6.x-1.1 stream as well. I had originally installed that version and run into the issue with some html entities not showing. Moved to the 6.x-2.x dev version and getting similar issues - all image-replace spans are being broken by encoded html.

I did a bit of searching and found this change to check_plain in the 6.17 maintainence update: http://drupal.org/node/523058, potentially could be the cause?

I haven't used this module before and thus haven't had a chance to understand the inner workings completely - couldn't find where the module would be check_plain'ing...Any idea on how to fix this issue?

Cheers for the great module!

michelle’s picture

Sorry, I haven't dug into the code at all. I just saw it on my site and made a note so I'd remember to look into it.

Michelle

Freshy88’s picture

Np, I had a bit of a look and made a bit of a dodgy work around that'll do for me for now. I'd prefer not post it as it's not at all the right way to do it (throwing some html_entity_decodes() into some of the theme files), but it was a quick fix!

I'll try help out with the issue if I get time to dissect where it's coming from sometime soon. Trying to work/study and do some community projects at once was a bad idea :(

Thanks again for the work you've put into the module.

michelle’s picture

Yeah, I know what you mean. Trying to be a full time mom, do several websites, be active in camera club, and work on 3 modules at the same time makes for insanity and very slow progress. :(

Michelle

greywolfsspirit’s picture

But we do appreciate all you do behind the scenes, Michelle.

michelle’s picture

Aww, thanks. :) Feedback helps me keep at it. :) Going out for my anniversary tonight and weekends are always bad for computer time but I'll try to have a look at this on Monday.

Michelle

greywolfsspirit’s picture

Michelle,
did we ever get a working fix for the apostrophe's being decoded as escape codes on topic navigation? I'm still seeing any topics with apostrophe's listed like this:

Previous topic: Izzy's Santa Fe Chili  Next topic: Exquisite Calzones 

Thanks,
Jim

P.s. Please note, I still can't see the navigation as is in the module, and have had to use the patch that was posted:

Advanced Forum Naviagtion Fix

in theme.inc, changed:
function advanced_forum_preprocess_node(&$variables) {
// Added lines below
     // Grab the topic navigation that we hijacked in nodeapi.  
    $variables['topic_navigation'] =  $variables['node']->advanced_forum_navigation;
// to here
if (advanced_forum_is_styled($variables['node'], 'node')) {
include_once drupal_get_path('module', 'advanced_forum') . '/includes/advanced_forum_preprocess_node.inc';
   _advanced_forum_preprocess_node($variables);
}
}

then in advanced_forum.naked.post.tpl.php
<?php
// Print the taxonomy terms for this node. This will print all terms,
// including the term of the forum itself. If you don't use any other
// taxonomy on forum posts, you can safely delete this section.
?>
<?php if ($top_post): ?>
  <div class="forum-top-post-footer">
   <?php print t('Tags') ?>: <?php print $terms ?>:  <?php print $topic_navigation ?>            <--- added the print $topic_navigation here
  </div>
<?php endif; ?>

Perhaps if you spot what is missing in that to correct it, that will at least get me squared away for now. Thanks!

michelle’s picture

carlthuringer dug in and found the source of the problem in #960776: HTML Entities, double check_plain resulting from t() function in advanced_forum.naked.topic-navigation.tpl.php . Looks like an easy enough fix. Will get that in the next time I work on AF.

Thanks,

Michelle

carlthuringer’s picture

Hey, great! Glad you spotted my issue and linked it, Michelle.

I'm not certain it's a complete fix, but based on my findings, that I believe that overuse of t() may result in some things running through check_plain twice, the other issues with html entities may be easier to track down.

I haven't done a translated Drupal site, so I'm not sure how it works, but there may already be an opportunity to translate node titles without the need for t() in the theme file.

michelle’s picture

I don't know a thing about translations other than I'm supposed to run stuff through t(). I haven't looked at this bit of code in a very long time so can't say any more off the top of my head. Not sure, yet, when I'm going to get back to coding AF but I'll be sure to look at this then. It fell off my radar for a while and I want to be sure to get it fixed before the next alpha.

Michelle

michelle’s picture

tagging

michelle’s picture

Status: Active » Fixed

I changed the @ to ! which inserts as is and doesn't run through check_plain. Not tested, yet, but that should do it.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.