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.
Over the last two week-ends I have worked at an adaptation of HTMLTidy to use PHP's tidy module rather than the tidy executable.
The code is still a bit rough but it might be good enough to share. Not sure whether you might be interested to incorporate it in HTMLTidy or not. To avoid confusion, I have used a different file name and module name.
Comment | File | Size | Author |
---|---|---|---|
#2 | phptidy.zip | 5.25 KB | andres@baravalle.it |
Comments
Comment #1
michaelfavia CreditAttribution: michaelfavia commentedattachment missing?
Comment #2
andres@baravalle.it CreditAttribution: andres@baravalle.it commentedYes, attachment missing... Sorry, here is it.
Comment #3
andres@baravalle.it CreditAttribution: andres@baravalle.it commentedhi, did you have the chance to look at the code?
Comment #4
gravisrs CreditAttribution: gravisrs commentedPiece of good work Andres! Well done, your module works like a charm.
Comment #5
reezy CreditAttribution: reezy commentedHello, I've been having some trouble getting this module to work.
I added the .module and .info files to a PHPtidy folder in my Modules directory. I then enabled the module from the site.
Would anyone be able to tell me how I can configure the tidy options. Specifically I would like to set "clean: true", but I do not know where to save my configuration file.
Comment #6
michaelfavia CreditAttribution: michaelfavia commentedId actually liek to base the module on the PECL tidy extension instead of the binary now that drupal has a git based VCS system i can actually work on this thing without going mad. I might make the swtich this week. ill leave the 1.x version in maintenance mode and port this to 2.x, need ot look into 7.x support as well.
Comment #7
colanNeeds to go into 7 first. Here's a link to the documentation: PHP: Tidy.
EDIT: Bonus points if you can get it to work with the experimental HTML5 version! :)