Most AbuseFilter variables operate based on a string representation of revision content. Non-textual content is converted to text by calling Content::getTextForSearchIndex. That is, AbuseFilter already has to assume that the string it operates on is plain text, and cannot be parsed using any particular syntax.
Because this is the case, it should be safe to simply concatenate the string representation of the Content of all slots of a given revision, as returned by AbuseFilter::contentToString.