Bug, output_filter, WB 2.8.2RC2

Xagone

when loading a template, you see a js file called that is not linked right

something like
<script src="/home/user/website/js/mdcr.js" type="text/javascript"></script>

it's because of line 116 throught in filter-routine.php in output-filter module.

this code does not work :
$script = str_replace('\\', '/', dirname(__FILE__)).'/js/mdcr.js';
if(is_readable($script)) {
$scriptLink = '<script src="'.$script.'" type="text/javascript"></script>';
$regex = '/(.*)(<\s*?\/\s*?head\s*>.*)/isU';
$replace = '$1'.$scriptLink.'$2';
$content = preg_replace ($regex, $replace, $content);
$output_filter_mode |= pow(2, 2); // n | 2^2
}

so to "repair" the problem, i've added the line
$script = str_replace(dirname(__FILE__),WB_URL.'/modules/output_filter',$script);
right after if(is_readable($script)) {
witch gives
$script = str_replace('\\', '/', dirname(__FILE__)).'/js/mdcr.js';
if(is_readable($script)) {
$script = str_replace(dirname(__FILE__),WB_URL.'/modules/output_filter',$script);
$scriptLink = '<script src="'.$script.'" type="text/javascript"></script>';
$regex = '/(.*)(<\s*?\/\s*?head\s*>.*)/isU';
$replace = '$1'.$scriptLink.'$2';
$content = preg_replace ($regex, $replace, $content);
$output_filter_mode |= pow(2, 2); // n | 2^2
}
Xagone Inc. (formerly VotreEspace)
[url="http://xagone.com/"]http://xagone.com/[/url]