http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96166

Revision: 96166
Author:   krinkle
Date:     2011-09-03 00:35:08 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Html.php: Move html5-validation blacklist check to *AFTER* the check the might 
continue (and skip this loop entirely) if we're not in HTML5 with an html5-only 
attribute.
* Performance :)

Modified Paths:
--------------
    trunk/phase3/includes/Html.php

Modified: trunk/phase3/includes/Html.php
===================================================================
--- trunk/phase3/includes/Html.php      2011-09-03 00:02:55 UTC (rev 96165)
+++ trunk/phase3/includes/Html.php      2011-09-03 00:35:08 UTC (rev 96166)
@@ -389,16 +389,6 @@
                        # and we'd like consistency and better compression 
anyway.
                        $key = strtolower( $key );
 
-                       # Bug 23769: Blacklist all form validation attributes 
for now.  Current
-                       # (June 2010) WebKit has no UI, so the form just 
refuses to submit
-                       # without telling the user why, which is much worse 
than failing
-                       # server-side validation.  Opera is the only other 
implementation at
-                       # this time, and has ugly UI, so just kill the feature 
entirely until
-                       # we have at least one good implementation.
-                       if ( in_array( $key, array( 'max', 'min', 'pattern', 
'required', 'step' ) ) ) {
-                               continue;
-                       }
-
                        # Here we're blacklisting some HTML5-only attributes...
                        if ( !$wgHtml5 && in_array( $key, array(
                                        'autocomplete',
@@ -415,6 +405,16 @@
                                continue;
                        }
 
+                       # Bug 23769: Blacklist all form validation attributes 
for now.  Current
+                       # (June 2010) WebKit has no UI, so the form just 
refuses to submit
+                       # without telling the user why, which is much worse 
than failing
+                       # server-side validation.  Opera is the only other 
implementation at
+                       # this time, and has ugly UI, so just kill the feature 
entirely until
+                       # we have at least one good implementation.
+                       if ( in_array( $key, array( 'max', 'min', 'pattern', 
'required', 'step' ) ) ) {
+                               continue;
+                       }
+
                        # See the "Attributes" section in the HTML syntax part 
of HTML5,
                        # 9.1.2.3 as of 2009-08-10.  Most attributes can have 
quotation
                        # marks omitted, but not all.  (Although a literal " is 
not


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to