I have an application in php that is intended for shared hosting. So, I am going to have a hard time always getting html tidy compiled, since the hosts will vary, and what they provide will vary.
Is it possible to just include the tidy executable in with my php application, and somehow, pipe html through that for cleaning?
I am just looking for a way to have html tidy bundled with my app, and not have to install or compile it after.
Thanks.
Since the Tidy extension is a binding for the Tidy HTML clean and repair utility, I don’t think this will work without compiling the Tidy utility on the destination server (not entirely sure though). If the utility is installed (but not the extension), you might be able to use Tidy through the command line, so you could try
For shared hosts not offering Tidy, you could use HTMLPurifier as a standalone alternative. It’s also somewhat more feature-rich than Tidy: