After some digging, I found that what I’m looking for is in wp-includes/feed.php:
$content = apply_filters(‘the_content’, get_the_content());
$content = str_replace(‘]]>’, ‘]]>’, $content);
return apply_filters(‘the_content_feed’, $content, $feed_type);
but the correct way to do it is with an XML parser, so I’m closing this one.
Thanks!