Revert RDFa and Microdata improvements to addMeta in r111439 till after the git migration.
This commit is contained in:
parent
d293a19804
commit
4bd652d90e
1 changed files with 5 additions and 25 deletions
|
|
@ -231,15 +231,6 @@ class OutputPage extends ContextSource {
|
|||
*/
|
||||
private $mRedirectedFrom = null;
|
||||
|
||||
/**
|
||||
* Name prefixes that can be used in addMeta
|
||||
*/
|
||||
public static $metaAttrPrefixes = array(
|
||||
'http' => 'http-equiv',
|
||||
'itemprop' => 'itemprop',
|
||||
'property' => 'property',
|
||||
);
|
||||
|
||||
/**
|
||||
* Constructor for OutputPage. This should not be called directly.
|
||||
* Instead a new RequestContext should be created and it will implicitly create
|
||||
|
|
@ -287,12 +278,6 @@ class OutputPage extends ContextSource {
|
|||
/**
|
||||
* Add a new <meta> tag
|
||||
* To add an http-equiv meta tag, precede the name with "http:"
|
||||
* To add a Microdata itemprop meta tag, precede the name with "itemprop:"
|
||||
* To add a RDFa property meta tag, precede the name with "property:"
|
||||
*
|
||||
* itemprop: and property: were introduced in 1.20, you can feature
|
||||
* test for them by checking for the key in the new
|
||||
* OutputPage::$metaAttrPrefixes variable.
|
||||
*
|
||||
* @param $name String tag name
|
||||
* @param $val String tag value
|
||||
|
|
@ -3010,16 +2995,11 @@ $templates
|
|||
}
|
||||
|
||||
foreach ( $this->mMetatags as $tag ) {
|
||||
$a = 'name'; // default attribute
|
||||
foreach ( self::$metaAttrPrefixes as $prefix => $attribute ) {
|
||||
// Check if the name starts with the prefix
|
||||
if ( strpos( $tag[0], "$prefix:" ) === 0 ) {
|
||||
// Set the attribute name we're using
|
||||
$a = $attribute;
|
||||
// Strip the prefix from the name
|
||||
$tag[0] = substr( $tag[0], strlen( $prefix ) + 1 );
|
||||
break;
|
||||
}
|
||||
if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) {
|
||||
$a = 'http-equiv';
|
||||
$tag[0] = substr( $tag[0], 5 );
|
||||
} else {
|
||||
$a = 'name';
|
||||
}
|
||||
$tags[] = Html::element( 'meta',
|
||||
array(
|
||||
|
|
|
|||
Loading…
Reference in a new issue