protected function _outputAttr(&$attributes) { foreach ($attributes as $name => $val) { echo ' ' . $name . '="' . htmlspecialchars($val) . '"'; } }