D6 + last version of Geshifilter module fail to convert this python snippet:

print "[%d-%02d-%02d %02d:%02d:%02d] %s" % (l_time.tm_year, 
            l_time.tm_mon, 
            l_time.tm_mday, 
            l_time.tm_hour, 
            l_time.tm_min, 
            l_time.tm_sec, 
            string.strip() )  

Converted by geshi filter as:

print "[geshifilter-questionmarkphp]d-%02d-%02d %02d:%02d:%02d] %s" % (l_time.tm_year, 
            l_time.tm_mon, 
            l_time.tm_mday, 
            l_time.tm_hour, 
            l_time.tm_min, 
            l_time.tm_sec, 
            string.strip() )  


Anyone is able to reproduce the same bug ?

Thanks a lot.

Comments

paolomainardi’s picture

Anyone ?

soxofaan’s picture

Version: 6.x-1.4 » 6.x-1.x-dev

confirmed

this is the code that causes it:

function _geshifilter_prepare($format, $text) {
  // ...................
  if (in_array(GESHIFILTER_BRACKETS_PHPBLOCK, $tag_styles)) {
    // Prepare < ?php ... ? > blocks.
    $pattern = '#[\[<](\?php|\?PHP|%)(.+?)((\?|%)[\]>]|$)#s';
    $text = preg_replace_callback($pattern, '_geshifilter_prepare_php_callback', $text);
  }
  return $text;
}

which is a bit too aggressive on your source code

do you use the "PHP style source code blocks" container tag style? If not, you can disable it as workaround.

paolomainardi’s picture

Yes, it was active and never used, i've just disabled it in order to resolve the issue.

Thanks a lot for the info.

paolomainardi’s picture

Issue summary: View changes

Typo fixing

yukare’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is not supported anymore. Please reopen if this issue is still relevant.