I've just worked on this htmltidy module a bit, and have added the following features:
Modified to (optionally) use it as include an input validator, fixing user-entered code on node Preview and Save, so invalid HTML never even enters the system
Added htmltidy as a Drupal output filter, so the result can be cached. The output-buffer method looked inefficient for real sites.
Enabled the output-buffer default to be turned off for admin user (it was always on before) yet still have these other functions available
Added support for external configuration file. (htmltidy.conf) to take advantage of advanced options (like the MS word cleanup)
Added 'install' routine for folk with limited access to their servers to get the tidy binary! Automated remote package install, even without shell.
Should I send a patch here? It would be as big as the file itself.
.dan.
| Comment | File | Size | Author |
|---|---|---|---|
| htmltidy.module | 19.01 KB | dman |
Comments
Comment #1
dman commentedIs this project 'abandoned'?
Following completion of this bounty Word Cleaner for input I'd like to contribute this back to the community (with the sponsorship of Gabriele Ferri -
www.semioticamente.it)
The additions are listed above. Tested (lightly) in Win32,Linux and MacOSX
Comment #2
dman commentedOK, with that deafening silence in interest from everyone, I'm just moving ahead. I tried emailing everyone on the list a few weeks back, but it looks a bit quiet out there.
For the purposes in establishing a baseline, I committed my stuff and tagged it 4.6.
Yay.
Then, just to make the exercise worthwhile, I also migrated the thing to Drupal 4.7.
Woo.
And, to be able to continue to develop, but not leave the 4.6ers totally in the dust, I've created an experimental forms API backport. This isn't really the best place to put it, but it'll take a few weeks and some discussion before I get it set up in its own space.
Point being, the 4.7 release (yes, I've called it a release, sorta had to to distinguish between Drupal versions) is now 4.7 native.
BUT it can still be run on 4.6 if you grab the back-port. Not quite sure how to tag it. A 4.6 user can checkout the 4.7 htmltidy.module and the 4.6 forms_api_backport.module ... together you'll have success, but you CANNOT load forms_api_backport.module onto a 4.7 system (as it emulates a lot of 4.7 core functions)
Confused? Sorry.
This is why I tagged the last 4.6 release. Just use that one.
If you want a version without any of my enhancements, CVS from version 1.21 - that's where it's status was sitting until I got hold of it.
.dan.
Comment #3
scroogie commentedThanks a lot that you took the project! This is a very handy module.
Comment #4
(not verified) commented