Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/323408

Change subject: Html: Unblacklist HTML5 form validation attributes
......................................................................

Html: Unblacklist HTML5 form validation attributes

We blacklisted them in 2010. Modern browsers support them fairly well,
and it doesn't seem to conflict with any of our code.

I tested this with SecurePoll poll creation form, which contains an
astonishingly wide range of form controls and validation options.

Change-Id: I08244addcf9b6eb96137895f28e7b750914fef5c
---
M includes/Html.php
1 file changed, 0 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/323408/1

diff --git a/includes/Html.php b/includes/Html.php
index 0b6b655..b46ea81 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -485,22 +485,6 @@
                        // 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.
-
-                       // As the default value of "1" for "step" rejects 
decimal
-                       // numbers to be entered in 'type="number"' fields, 
allow
-                       // the special case 'step="any"'.
-
-                       if ( in_array( $key, [ 'max', 'min', 'pattern', 
'required' ] )
-                               || $key === 'step' && $value !== 'any' ) {
-                               continue;
-                       }
-
                        // https://www.w3.org/TR/html401/index/attributes.html 
("space-separated")
                        // https://www.w3.org/TR/html5/index.html#attributes-1 
("space-separated")
                        $spaceSeparatedListAttributes = [

-- 
To view, visit https://gerrit.wikimedia.org/r/323408
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08244addcf9b6eb96137895f28e7b750914fef5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

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

Reply via email to