39 return 'HTML Tidy Errors Test';
52 return 'A test to find HTML Tidy fails in WYSIWYG content areas';
66 public static function test(&$messages, &$errors)
70 $am = $GLOBALS[
'SQ_SYSTEM']->am;
71 $wysiwygs = $am->getTypeAssetids(
'content_type_wysiwyg');
73 foreach ($wysiwygs as $wysiwyg) {
74 $asset = $am->getAsset($wysiwyg,
'', TRUE);
75 if (is_null($asset)) {
78 $errors[] =
'Asset #'.$wysiwyg.
' could not be loaded';
80 $tidyStatus = $asset->attr(
'htmltidy_status');
81 if ($tidyStatus !=
'pass') {
84 $errors[] =
'HTML Tidy has not validated Asset #'.$wysiwyg;
86 $am->forgetAsset($asset, TRUE);
90 if (!$status && !empty($count)) {
91 $messages[] =
'There are '.$count.
' content types with HTML Tidy issues';