protected function getHtmlAttributes($attributes) {
		$list = array();
		foreach ($attributes as $name=>$value) {
			if (!empty($value)) {
				if (is_scalar($value)) {
					$list[] = "$name='" . htmlentities($value, ENT_QUOTES, "UTF-8") . "'";
				} elseif (is_array($value)) {
					$list[] = $this->getHtmlAttributes($value);
				}
			}
		}
		if (count($list)>0) {
			return " " . implode(" ", $list);
		}

		return "";
	}