From: Aryeh Gregor Date: Fri, 11 Mar 2011 02:10:00 +0000 (+0000) Subject: Allow all itemtypes for microdata X-Git-Tag: 1.31.0-rc.0~31518 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=fa86cd606e8936fcf53b12619f496b8f6f503482;p=lhc%2Fweb%2Fwiklou.git Allow all itemtypes for microdata It's really not all that useful otherwise. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f2cbf0a697..a592d65e64 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -96,6 +96,8 @@ PHP if you have not done so prior to upgrading MediaWiki. differently (italicized by default) on Special:SpecialPages * Added $wgAggregateStatsID, which allows UDP stats to be aggregated over several wikis. +* When $wgAllowMicrodataAttributes is true, all itemtypes are allowed, not just + the three that were defined in the original specification. === Bug fixes in 1.18 === * (bug 23119) WikiError class and subclasses are now marked as deprecated diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 0fc5a1cd3f..e26c86d861 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -686,19 +686,6 @@ class Sanitizer { } if ( $wgAllowMicrodataAttributes ) { - # There are some complicated validity constraints we need to - # enforce here. First of all, we don't want to allow non-standard - # itemtypes. - $allowedTypes = array( - 'http://microformats.org/profile/hcard', - 'http://microformats.org/profile/hcalendar#vevent', - 'http://n.whatwg.org/work', - ); - if ( isset( $out['itemtype'] ) && !in_array( $out['itemtype'], - $allowedTypes ) ) { - # Kill everything - unset( $out['itemscope'] ); - } # itemtype, itemid, itemref don't make sense without itemscope if ( !array_key_exists( 'itemscope', $out ) ) { unset( $out['itemtype'] );