After installing I immediately went to check out the Editor Text Area. To see what it could do.
I was surprised to see that it didn't store any HTML at all.
Switching editors and changing the filter settings didn't help either.
I finally traced it down to comprofiler.class.php line 5095
As you can see in the code below. the "if class_exists" appears to fail, defaulting back to a strip_tags instruction.
This is because the class
JInputFilter does not exist.
What does exist is
JFilterInput
I changed that, and now it works fine.
[code:1]
function clean( $filter, $source, $type='string' ) {
if ( class_exists( "JInputFilter" ) ) {
$result = $filter->clean( $source, $type );
} elseif ( class_exists( "InputFilter" ) ) {
// Handle the type constraint
switch (strtoupper($type))
{
case 'INT' :
case 'INTEGER' :
// Only use the first integer value
@ preg_match('/-?[0-9]+/', $source, $matches);
$result = @ (int) $matches[0];
break;
case 'FLOAT' :
case 'DOUBLE' :
// Only use the first floating point value
@ preg_match('/-?[0-9]+(\.[0-9]+)?/', $source, $matches);
$result = @ (float) $matches[0];
break;
case 'BOOL' :
case 'BOOLEAN' :
$result = (bool) $source;
break;
case 'WORD' :
$result = (string) preg_replace( '#\W#', '', $source );
break;
default :
$result = $this->_process( $filter, $source );
break;
}
} else {
$result = strip_tags( $source ); // sorry, but old mambo versions are unsafe
}
return $result;
}
[/code:1]
Installed Joomla version 1.5.4
Installed CB 1.1
Also..
When I was google searching for part of your code I came across 2 sets of Joomla API documentation, that contradict each other at exactly this point.
So. Do not go here:
docs.huihoo.com/api/joomla/1.5/Joomla-Framework/Filter/JInputFilter.html
But go here:
api.joomla.org/Joomla-Framework/Filter/JFilterInput.html
I'm thinking it's a Chinese conspiracy