I faced the same problem and created this function:
function incomplete_cat_list($separator) {
$first_time = 1;
foreach((get_the_category()) as $category) {
if ($category->cat_name != 'FirstCat' && $category->cat_name != 'SecondCat') {
if ($first_time == 1) {
echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>';
$first_time = 0;
} else {
echo $separator . '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>';
}
}
}
}
Put it in the functions.php file of your theme. In your template you can use incomplete_cat_list(‘seperator’) instead of the_category(‘seperator’).
I hope this function helped you!