/** * Convert the attribute list to html. * * @param array $attributes Attributes * * @return string */ public function toHtml(array $attributes) { $html = array(); foreach ($attributes as $attribute => $value) { $html[] = sprintf('%s="%s"', $attribute, Filter::escape($value)); } return implode(' ', $html); }
/** * Parse tag content. * * @param resource $parser XML parser * @param string $content Tag content */ public function dataTag($parser, $content) { // Replace with normal space $content = str_replace(" ", ' ', $content); $this->output .= Filter::escape($content); }