// In text/html, initial <html> and <head> tags can be omitted under
// pretty much any sane circumstances, if they have no attributes. See:
// <http://www.whatwg.org/html/syntax.html#optional-tags>
// In text/html, initial <html> and <head> tags can be omitted under
// pretty much any sane circumstances, if they have no attributes. See:
// <http://www.whatwg.org/html/syntax.html#optional-tags>
- if ( !$wgWellFormedXml && !$attribs
- && in_array( $element, array( 'html', 'head' ) ) ) {
+ if ( !$wgWellFormedXml && !$attribs && in_array( $element, array( 'html', 'head' ) ) ) {
- if ( isset( $attribDefaults[$element][$lcattrib] ) &&
- $attribDefaults[$element][$lcattrib] == $value ) {
+ if ( isset( $attribDefaults[$element][$lcattrib] )
+ && $attribDefaults[$element][$lcattrib] == $value
+ ) {
- if ( $element === 'link' && isset( $attribs['type'] )
- && strval( $attribs['type'] ) == 'text/css' ) {
+ if ( $element === 'link'
+ && isset( $attribs['type'] ) && strval( $attribs['type'] ) == 'text/css'
+ ) {
// For boolean attributes, support array( 'foo' ) instead of
// requiring array( 'foo' => 'meaningless' ).
// For boolean attributes, support array( 'foo' ) instead of
// requiring array( 'foo' => 'meaningless' ).
// marks omitted, but not all. (Although a literal " is not
// permitted, we don't check for that, since it will be escaped
// anyway.)
// marks omitted, but not all. (Although a literal " is not
// permitted, we don't check for that, since it will be escaped
// anyway.)
// See also research done on further characters that need to be
// escaped: http://code.google.com/p/html5lib/issues/detail?id=93
$badChars = "\\x00- '=<>`/\x{00a0}\x{1680}\x{180e}\x{180F}\x{2000}\x{2001}"
. "\x{2002}\x{2003}\x{2004}\x{2005}\x{2006}\x{2007}\x{2008}\x{2009}"
. "\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}";
// See also research done on further characters that need to be
// escaped: http://code.google.com/p/html5lib/issues/detail?id=93
$badChars = "\\x00- '=<>`/\x{00a0}\x{1680}\x{180e}\x{180F}\x{2000}\x{2001}"
. "\x{2002}\x{2003}\x{2004}\x{2005}\x{2006}\x{2007}\x{2008}\x{2009}"
. "\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}";
// main we don't use "" but the user message describing it (e.g. "(Main)" or "(Article)")
$nsName = wfMessage( 'blanknamespace' )->text();
} elseif ( is_int( $nsId ) ) {
// main we don't use "" but the user message describing it (e.g. "(Main)" or "(Article)")
$nsName = wfMessage( 'blanknamespace' )->text();
} elseif ( is_int( $nsId ) ) {