Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the D7 branch currently, the module assumes that the only field to operate on is the "body" field. This is a carry-over from D6 where that was the only possible field. Now that we have the Field API in D7, the filtering can apply to any field. This needs to be generalized so that any field with a text format that has this filter enabled will be filtered. So we need to check for all relevant fields, and then apply the filtering to all of them.
This is a bug because an error is produced if that field doesn't exist.
Comments
Comment #1
colanAdding tag.
Comment #2
colanI did some reorganizing and cleaning in these commits:
As far as actual coding, I was able to remove the hard-coding for the "body" field. All of the node's fields are now checked. What's even better is that I got it working for all languages and instances/multiples. The commit ID for this is fd56105.
Why just nodes? Core doesn't support an entity hook for this at this time. See #1537438: Allow non-node entity types to be tidied before editing for details.
Custom settings for the filter on each text format are not being picked up yet, but they are available. I'll get to this in #1536174: Custom filter settings aren't being loaded.
Comment #3
colanIt's done for pre-editing (hook_node_prepare), just not post-editing (hook_node_validate). I'll get to that next.
Comment #4
colanThe validation code is now up-to-date, and working. See these commits for details:
Comment #5.0
(not verified) CreditAttribution: commentedAdded rationale for this being a bug.