When using a [code] block with line-breaks (the "\n" kind) they are firstly converted to <br /> tags and finally to &lt;br /&gt;. The latter action is because there shouldn't be any working HTML tags inside code blocks, but it fails when parsing line-breaks. I've tried to find out where the problem lies myself, but I lack enough knowledge of the module and PHP to fix it. I guess it's got something to do with line 18 in bbcode-filter.inc, but whatever I edit, it doesn't change a thing.
$code_tag[1] = str_replace(array('<', '>'), array('&lt;', '&gt;'), $code_tag[1]);

Comments

naudefj’s picture

Sounds like a config problem to me.

Have you enabled Drupal's "Line break converter"?

If so, will it fire before or after the BBCode filter (see "Rearrange" tab)?

What's your setting for "Smart paragraph and line breaks:"?

xano’s picture

Status: Active » Closed (fixed)

I'm so ashamed :P

I've set it to fire after the BBcode filter and now it works perfectly. Thanks for the subtle hint ;-)