MediaWiki r56601 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r56600‎ | r56601 (on ViewVC)‎ | r56602 >
Date:14:19, 18 September 2009
Author:simetrical
Status:ok
Tags:
Comment:
Don't drop default attrib values in non-HTML5

Some attributes that have defaults in HTML5 don't have defaults in
XHTML1, particularly type="" on scripts and styles (bug 20713). There's
not much point in trying to maintain two separate sets of defaults,
so I've just kept the HTML5 ones and haven't tried to strip any defaults
in XHTML1 mode.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/Html.php
@@ -195,6 +195,13 @@
196196 * @return array An array of attributes functionally identical to $attribs
197197 */
198198 private static function dropDefaults( $element, $attribs ) {
 199+ # Don't bother doing anything if we aren't outputting HTML5; it's too
 200+ # much of a pain to maintain two sets of defaults.
 201+ global $wgHtml5;
 202+ if ( !$wgHtml5 ) {
 203+ return $attribs;
 204+ }
 205+
199206 static $attribDefaults = array(
200207 'area' => array( 'shape' => 'rect' ),
201208 'button' => array(

Follow-up revisions

Rev.Commit summaryAuthorDate
r56725Merge trunk r56601: Don't drop default attrib values in non-HTML5 (bug 20713)brion18:29, 21 September 2009

Status & tagging log

Personal tools
Namespaces

Variants
Views
Actions
Navigation
Support
Download
Development
Communication
Toolbox