What hook runs on all filtered input text of all filter types? This is one of those, "Looked everywhere in the API for a hook, can't find it" questions. There must be a hook like I'm looking for, but none of my searches have found anything.

I'm looking for a simple hook in D7 that lets me edit text filtered content, after it's gone through a text input filter, before it's saved: regardless of which input filter, and regardless of entity type (i.e. not just nodes).

I can't find a suitable hook. The new-style hook_filter() alternative hook_filter_info() isn't suitable because I want this code to run on all input filters, so I don't want to define a new one. 

hook_node_save() is too specific. I could maybe hook on hook_entity_presave() then load field info, then look through all fields looking for fields that are longtext fields, then act on those, but I'm hoping there's something more direct. That sounds like a lot of extra work for something simple. I'd prefer not to have every single entity save load all the field info and check every field (unless there's a very low-overheads way to do that).

What's the simplest, cleanest way to get code to run on all text that has gone through an input filter, regardless of the input filter?
Here's my best clunky workaround so far:

  &lt;?php
  function mymodule_entity_presave($entity, $type) {
  $fields = field_info_fields();
  foreach($fields as $field) {
    if ($field['type'] == "text_long" || $field['type'] == "text_with_summary") {
      if( isset($entity-&gt;{$field['field_name']}) ){
        foreach ($entity-&gt;{$field['field_name']} as $langcode =&gt; $items) {
          foreach ($items as $delta =&gt; $item) {
            $value =&amp;$entity-&gt;{$field['field_name']}[$langcode][$delta]['value']; 
            $value = _mymodule_do_stuff( $value );

            if ($field['type'] == "text_with_summary") {
              $summary =&amp;$entity-&gt;{$field['field_name']}[$langcode][$delta]['summary'];
              $summary = _mymodule_do_stuff( $summary );

            }
          }
        }
      }
    }
  }
}


Not ideal at all, but I think it beats the only non-core-hacking alternative I can see which is to use hook_field_attach_presave();. The code would be almost identical, and I believe it would be worse since we'd have to call and loop through field_info_fields() once for every field on every saved entity (instead of once for every saved entity).