function wfIsWellFormedXml($text)
{
    return Xml::isWellFormed($text);
}
Esempio n. 2
0
 /**
  * Check if a string is a well-formed XML fragment.
  * Wraps fragment in an \<html\> bit and doctype, so it can be a fragment
  * and can use HTML named entities.
  *
  * @param string $text
  * @return bool
  */
 public static function isWellFormedXmlFragment($text)
 {
     $html = Sanitizer::hackDocType() . '<html>' . $text . '</html>';
     return Xml::isWellFormed($html);
 }
Esempio n. 3
0
function wfIsWellFormedXml($text)
{
    wfDeprecated(__FUNCTION__);
    return Xml::isWellFormed($text);
}