64 and xml_parse($parser, "
$text
")) { if (strpos($text, '<') !== false) { $type = 'xhtml'; $text = "
$text
"; } } else { $type = 'html'; if (strpos($text, ']]>') === false) { $text = ""; } else { $text = htmlspecialchars($text); } } xml_parser_free($parser); $result = "<$element"; if ($type) $result .= " type='$type'"; if ($base) $result .= " xml:base='$base'"; $result .= ">$text"; return $result; } ?> emphasized and bold words.'); print "\n" . textConstruct('summary', null, 'lengthy text with some emphasized and bold words.'); print "\n" . textConstruct('summary', null, 'x
y'); print "\n" . textConstruct('content', null, 'x
y ]]> z'); ?>