Index: branches/wmf/1.16wmf4/includes/Html.php |
— | — | @@ -168,22 +168,6 @@ |
169 | 169 | if ( $element == 'textarea' && isset( $attribs['maxlength'] ) ) { |
170 | 170 | unset( $attribs['maxlength'] ); |
171 | 171 | } |
172 | | - # Here we're blacklisting some HTML5-only attributes... |
173 | | - $html5attribs = array( |
174 | | - 'autocomplete', |
175 | | - 'autofocus', |
176 | | - 'max', |
177 | | - 'min', |
178 | | - 'multiple', |
179 | | - 'pattern', |
180 | | - 'placeholder', |
181 | | - 'required', |
182 | | - 'step', |
183 | | - 'spellcheck', |
184 | | - ); |
185 | | - foreach ( $html5attribs as $badAttr ) { |
186 | | - unset( $attribs[$badAttr] ); |
187 | | - } |
188 | 172 | } |
189 | 173 | |
190 | 174 | return "<$element" . self::expandAttributes( |
— | — | @@ -329,6 +313,32 @@ |
330 | 314 | # and we'd like consistency and better compression anyway. |
331 | 315 | $key = strtolower( $key ); |
332 | 316 | |
| 317 | + # Bug 23769: Blacklist all form validation attributes for now. Current |
| 318 | + # (June 2010) WebKit has no UI, so the form just refuses to submit |
| 319 | + # without telling the user why, which is much worse than failing |
| 320 | + # server-side validation. Opera is the only other implementation at |
| 321 | + # this time, and has ugly UI, so just kill the feature entirely until |
| 322 | + # we have at least one good implementation. |
| 323 | + if ( in_array( $key, array( 'max', 'min', 'pattern', 'required', 'step' ) ) ) { |
| 324 | + continue; |
| 325 | + } |
| 326 | + |
| 327 | + # Here we're blacklisting some HTML5-only attributes... |
| 328 | + if ( !$wgHtml5 && in_array( $key, array( |
| 329 | + 'autocomplete', |
| 330 | + 'autofocus', |
| 331 | + 'max', |
| 332 | + 'min', |
| 333 | + 'multiple', |
| 334 | + 'pattern', |
| 335 | + 'placeholder', |
| 336 | + 'required', |
| 337 | + 'step', |
| 338 | + 'spellcheck', |
| 339 | + ) ) ) { |
| 340 | + continue; |
| 341 | + } |
| 342 | + |
333 | 343 | # See the "Attributes" section in the HTML syntax part of HTML5, |
334 | 344 | # 9.1.2.3 as of 2009-08-10. Most attributes can have quotation |
335 | 345 | # marks omitted, but not all. (Although a literal " is not |
Property changes on: branches/wmf/1.16wmf4/includes/Html.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
336 | 346 | + /branches/REL1_15/phase3/includes/Html.php:51646 |
/branches/sqlite/includes/Html.php:58211-58321 |
/branches/wmf-deployment/includes/Html.php:53381,60970 |
/trunk/phase3/includes/Html.php:63549,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,67283,67869 |