r83689 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83688‎ | r83689 | r83690 >
Date:02:10, 11 March 2011
Author:simetrical
Status:ok
Tags:
Comment:
Allow all itemtypes for microdata

It's really not all that useful otherwise.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Sanitizer.php
@@ -686,19 +686,6 @@
687687 }
688688
689689 if ( $wgAllowMicrodataAttributes ) {
690 - # There are some complicated validity constraints we need to
691 - # enforce here. First of all, we don't want to allow non-standard
692 - # itemtypes.
693 - $allowedTypes = array(
694 - 'http://microformats.org/profile/hcard',
695 - 'http://microformats.org/profile/hcalendar#vevent',
696 - 'http://n.whatwg.org/work',
697 - );
698 - if ( isset( $out['itemtype'] ) && !in_array( $out['itemtype'],
699 - $allowedTypes ) ) {
700 - # Kill everything
701 - unset( $out['itemscope'] );
702 - }
703690 # itemtype, itemid, itemref don't make sense without itemscope
704691 if ( !array_key_exists( 'itemscope', $out ) ) {
705692 unset( $out['itemtype'] );
Index: trunk/phase3/RELEASE-NOTES
@@ -96,6 +96,8 @@
9797 differently (italicized by default) on Special:SpecialPages
9898 * Added $wgAggregateStatsID, which allows UDP stats to be aggregated over
9999 several wikis.
 100+* When $wgAllowMicrodataAttributes is true, all itemtypes are allowed, not just
 101+ the three that were defined in the original specification.
100102
101103 === Bug fixes in 1.18 ===
102104 * (bug 23119) WikiError class and subclasses are now marked as deprecated

Status & tagging log