CleanHTML Plugin

CleanHTML can be configured to use the Tidy PHP extension to parse and fix your code to make it valid XHTML 1.0 or HMTL 4.01.

When Tidy is not available (i.e., most hosting providers still don’t include this extension) or if you just decide not to enable this feature, the plug-in can perform a set of manual cleanups using regular expressions such as replacing for , fix unescaped query strings, sanitize ID attributes, enclose SCRIPT and STYLE blocks of code in CDATA sections, etc.

Last but not least, you can add custom rules with raw PHP code that are applied to the HTML page generated by Joomla! to adjust it before is sent to the visitor.

There are no more excuses, you should have a Standards Compliant Joomla! Website!

Report

This is a rehash of what has been attempted before with Tidy and Joomla.

There is a reason that Tidy is not implemented by most ISPs. It breaks certain functions of different php programs and is more trouble than it is worth.

Tidy does not take the place of poorly written code. If you want compliant code then write it to be compliant or ask the developers (nicely) to make sure their code is WWW3 compliant.

For those using jomsocial,I know for a fact, this plugin will break your registration process.

Your user , upon registering, will get the error PHPMAILER_EXECUTE/usr/sbin/sendmail

which means your user will not get a notification email and they will not be able to log into the new account they just created.

I strongly advise not using this plugin as it may break more than it fixes. History repeats itself and this is the only reason I am commenting here.

I'm of the philosophical school of thought, "If it ain't broke, don't fix it." If your site works, don't fix it. Compliance is only a goal for programmers and web browser creators. The end user should not have toput a band aid on the situation. Compliance is not set in stone and has no control over MS who currently has the market on web browser usage - like it or not.

This is not a slam on the developer - the plugin is written well.
Owner's reply

Hi reverendspam,

I understand to certain degree your point of view but I don't completely share it, let me explain mine.

Tidy is the easy "plug-n-go" option of the plugin but I agree that Tidy can cause some problems, in fact the use of it is disabled by default in CleanHTML and I don't personally use it with my Websites, but I included the option because other people might find it useful (with simpler sites, for example not using JomSocial).

The strongest part of this plugin is it's manual cleanup and custom replacements (and that is what I recommend to use instead of Tidy), you can write your own string replacements using straight PHP, regular expressions, etc.

In fact custom replacements can be used to whatever you need, not just to accomplish standards compliance but any other thing you may need to modify after the page is generated by Joomla but before it is sent to the visitor's browser.

Compliance is generally a goal of programmers and web browser creators as you said but this is not entirely true, in fact I wrote this plugin because a client of mine requested specifically an XHTML 1.0 Compliant Joomla Website and I was going crazy trying to accomplish that, there are some people out there (not necessarily programmers) that also care about this (usually technology related businesses).

I installed this plugin (didn't use Tidy), enabled the manual cleanups, added some custom rules with PHP and voila! got what I needed :)

This plugin is not magical in the sense that it probably won't make your page valid XHTML just by installing it (unless you enable Tidy), but it will get you very close so you can do the rest by adding manual string replacements in there.

If you're a developer and face a situation like the one I just mentioned or you just care a lot about Web standards you know now you have now an option.

This plugin is mainly intended for Web developers because you might need to know about Web standards and some basic PHP, if you don't I would say that this plugin may not be the right one for you.