if ( $allowShortTag && $contents === '' ) {
$out .= ' />';
} else {
- $out .= '>' . htmlspecialchars( $contents ) . "</$element>";
+ $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . "</$element>";
}
}
return $out;
* content you have is already valid xml.
*
* @param string $element Element name
- * @param array $attribs Array of attributes
+ * @param array|null $attribs Array of attributes
* @param string $contents Content of the element
* @return string
*/
- public static function tags( $element, $attribs = null, $contents ) {
+ public static function tags( $element, $attribs, $contents ) {
return self::openElement( $element, $attribs ) . $contents . "</$element>";
}