--- modules/wysiwyg_filter/wysiwyg_filter.module Wed Feb 18 17:24:12 2009 +++ modules/wysiwyg_filter/wysiwyg_filter.module Mon Jun 08 10:20:26 2009 @@ -669,6 +669,12 @@ // Ignore the whole element if required attribute is not present. return FALSE; } + + // When no attribute value has been specified in parsed HTML stream, + // then supply default value if provided by input format settings. + if (!isset($attrinfo['value']) && isset($allowed_attributes[$attrname]['default'])) { + $attrarr[$attrname] = array('value' => $allowed_attributes[$attrname]['default'], 'delimiter' => '"'); + } } // Check the current HTML element for additional attribute rules. @@ -677,12 +683,6 @@ foreach ($attrarr as $attrname => $attrinfo) { $parsed_attribute = $attrname; $attribute_options = (isset($allowed_attributes[$attrname]) ? $allowed_attributes[$attrname] : array()); - - // When no attribute value has been specified in parsed HTML stream, - // then supply default value if provided by input format settings. - if (!isset($attrinfo['value']) && isset($attribute_options['default'])) { - $attrinfo['value'] = $attribute_options['default']; - } if (isset($attrinfo['value'])) { // Supply forced attribute value as defined by input format?