How can I tell MailWizz how to use or not to use php’s Tidy extension?
[UPDATE] – Since MailWizz 1.3.7 you can enable/disable Tidy from Backend > Settings > Common. Please note that the setting from the code also works and has more weight than the one from the web interface, therefore if Tidy is enabled from the code but disabled from the web interface, then it will be disabled, but if it is disabled from the code and enabled from the web interface then it will remain disabled.
By default, MailWizz makes use of PHP’s Tidy extension in order to clean and repair the email templates before their reach the parsing engine. This only works if your PHP install has the Tidy extension enabled. You can override the default behaviour by editing the file main-custom.php located in apps/common/config folder.
After you edit the file, it should look like:
return array( // application components 'components' => array( 'db' => array( 'connectionString' => 'mysql:host=localhost;dbname=__name__', 'username' => '__username__', 'password' => '__password__', 'tablePrefix' => 'mw_', ), ), // params 'params' => array( /* START OUR CHANGES */ // use tidy for templates parsing 'email.templates.tidy.enabled' => false, // tidy default options 'email.templates.tidy.options' => array( 'indent' => true, 'output-xhtml' => true, 'wrap' => 200 ), /* END CHANGES */ ), );
As you can see, we have set:
'email.templates.tidy.enabled' => false, to disable Tidy. We can set it to true to enable it back again. You can also use pass additional tidy options by using the