To prevent code appearing in the searh results, you need to do a little core hack.
Not pretty... I know!
But it can't be done through a plugin (as far as I know).
So add a piece of code to this file:
/components/com_search/models/search.php
The code should end up like this, starting at line 148:
$this->_total = count($rows);
if($this->getState('limit') > 0) {
$this->_data = array_splice($rows, $this->getState('limitstart'), $this->getState('limit'));
} else {
$this->_data = $rows;
}
/* >>> ADDED: Run content plugins over results */
$data = 'search';
foreach( $this->_data as $i => $item ) {
if ( $item->text != '' ) {
$results = $dispatcher->trigger( 'onPrepareContent', array ( &$item, &$data, 0 ) );
$item->title = strip_tags( $item->title );
}
}
/* <<< */
}
return $this->_data;
}