In
vault/class/bbcode/template.php, find:
Code:
$template_text = $this->process_template_params($title, $template_text, $args);
Replace with:
Code:
if ($do_nl2br AND $orig_options['do_nl2br'])
{
$undo_nl2br = true;
}
else
{
$undo_nl2br = false;
}
$template_text = $this->process_template_params($title, $template_text, $args, $undo_nl2br);
Code:
function process_template_params($key, $text, $vars)
Replace with:
Code:
function process_template_params($key, $text, $vars, $undo_nl2br = false)
Find:
Code:
$text = str_replace($param['find'], '<!-- was param -->' . $value . '<!-- / was param -->', $text);
Add before:
Code:
if ($undo_nl2br AND !$this->parser->options['do_html'])
{
$value = preg_replace('#<br(?: /)?>(?:\r\n|\r|\n)#s', "\n", $value);
}
Code:
$text = $obfuscater->run($text, 1);
Add after:
Code:
if ($undo_nl2br AND $this->parser->options['do_html'])
{
preg_match_all('#<!-- was param -->.*<!-- / was param -->#sU', $text, $matches);
if ($matches[0])
{
foreach ($matches[0] AS $old_param)
{
$new_param = preg_replace('#<br(?: /)?>(?:\r\n|\r|\n)#s', "\n", $old_param);
$text = str_replace($old_param, $new_param, $text);
}
}
}