Exemple #1
0
 /**
  * Format an XML element as with self::element(), but run text through the
  * $wgContLang->normalize() validator first to ensure that no invalid UTF-8
  * is passed.
  *
  * @param $element String:
  * @param array $attribs Name=>value pairs. Values will be escaped.
  * @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default)
  * @return string
  */
 public static function elementClean($element, $attribs = array(), $contents = '')
 {
     if ($attribs) {
         $attribs = array_map(array('UtfNormal', 'cleanUp'), $attribs);
     }
     if ($contents) {
         $contents = WebRequest::normalize_static($contents);
     }
     return self::element($element, $attribs, $contents);
 }