Closed (fixed)
Project:
HTML Tidy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
17 Apr 2012 at 01:58 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent
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) commentedAdded rationale for this being a bug.