Closed (fixed)
Project:
HTML Tidy
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 May 2007 at 18:01 UTC
Updated:
7 Jun 2007 at 16:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
sanduhrsAdditionally there's a htmltidy.info file needed.
Attached patch is against htmltidy HEAD and adds the menu_hook and the .info file.
vg
Comment #2
karens commentedI found some additional changes needed in 5.x. Changing the value of $node->body in the validate operation won't work in 5.x, you have to use form_set_value(). I'm not sure the teaser is getting set right yet, and I can't confirm that this won't interfere with other filters, so those things need investigation.
The form_set_error() on warnings made it impossible to save any code that generated warnings (which is most of them), so I changed it to drupal_set_message on warnings and only set an error on errors.
The hook_init() and hook_exit() code makes it impossible to use aggressive caching in 5.x and unnecessarily runs on cached pages, so I removed that code and put it in a separate module, htmltidy_output, that can optionally be enabled. I also cleaned it up so it wouldn't try to run htmltidy on cached pages.
I shouldn't be adding new features, but I needed an option to clean up Microsoft Word input, so I also added a variable for that option.
My patch program won't allow me to add in new files, so this patch is missing the .info file and the new module files I added. I'll add another comment with my proposed new module that would run htmltidy on the entire site output.
Comment #3
karens commentedAnd here's the new separate module for running htmltidy on the entire site.
Comment #4
drewish commentedcommitted to head
Comment #5
karens commentedThe code I submitted works, but throws an error. Here is a tiny fix that will get rid of the error. With that, I think you could safely create a 5x branch since this seems to work OK in 5x.
Comment #6
drewish commentedcreated the branch. removed the files from head. i'll create a new release as soon as d.o stops being so slow.
Comment #7
(not verified) commented