r67284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67283‎ | r67284 | r67285 >
Date:17:22, 3 June 2010
Author:simetrical
Status:ok
Tags:
Comment:
Backport r67283: (bug 23769) Disable HTML5 form validation for now

Is implemented in recent WebKit but with no UI, so it's worse than just
giving a server-side error. The only other implementation right now is
Opera and its UI is pretty ugly, so not yet worth the effort to do UA
sniffing.
Modified paths:
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/includes/Html.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/phase3/includes/Html.php
@@ -329,6 +329,16 @@
330330 # and we'd like consistency and better compression anyway.
331331 $key = strtolower( $key );
332332
 333+ # Bug 23769: Blacklist all form validation attributes for now. Current
 334+ # (June 2010) WebKit has no UI, so the form just refuses to submit
 335+ # without telling the user why, which is much worse than failing
 336+ # server-side validation. Opera is the only other implementation at
 337+ # this time, and has ugly UI, so just kill the feature entirely until
 338+ # we have at least one good implementation.
 339+ if ( in_array( $key, array( 'max', 'min', 'pattern', 'required', 'step' ) ) ) {
 340+ continue;
 341+ }
 342+
333343 # See the "Attributes" section in the HTML syntax part of HTML5,
334344 # 9.1.2.3 as of 2009-08-10. Most attributes can have quotation
335345 # marks omitted, but not all. (Although a literal " is not
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -275,10 +275,7 @@
276276 * The default output format is now HTML 5 instead of XHTML 1.0 Transitional.
277277 This can be disabled by setting $wgHtml5 = false;. Specific features enabled
278278 if HTML 5 is used:
279 -** New HTML 5 input attributes allow JavaScript-free input validation in some
280 - cutting-edge browsers. E.g., some inputs will be autofocused, users will
281 - not be allowed to submit forms with certain types of invalid values (like
282 - numbers outside the permitted ranges), etc.
 279+** Some extra inputs will be autofocused, in supporting browsers.
283280 ** The summary attribute has been removed from tables of contents. summary is
284281 obsolete in HTML 5 and wasn't useful here anyway.
285282 ** Unnecessary type="" attribute removed for CSS and JS.

Follow-up revisions

RevisionCommit summaryAuthorDate
r67590Release notes for r67284.tstarling05:36, 8 June 2010
r67975MFT r67283, r67869 (bug 23769): disable HTML 5 form validation attributeststarling02:01, 14 June 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67283(bug 23769) Disable HTML5 form validation for now...simetrical17:18, 3 June 2010

Status & tagging log