Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php |
— | — | @@ -286,6 +286,9 @@ |
287 | 287 | 'label' => $text, |
288 | 288 | 'section' => "gadgets$sectionCat", |
289 | 289 | 'default' => $gadget->isEnabledForUser( $user ), |
| 290 | + // HTMLForm is very strict about the names/IDs it accepts |
| 291 | + // So specify a custom name that we know is safe and won't change |
| 292 | + 'name' => 'gadgetpref-' . md5($id), |
290 | 293 | ); |
291 | 294 | } else { |
292 | 295 | $preferences["gadget-$id"] = array( |
— | — | @@ -294,6 +297,7 @@ |
295 | 298 | // TODO the below means source and category IDs can't contain slashes or dashes, enforce this |
296 | 299 | 'section' => "gadgetsshared/gadgetrepo-$repoSource$sectionCat", |
297 | 300 | 'cssclass' => 'mw-gadgets-shared-pref', |
| 301 | + 'name' => 'gadgetpref-' . md5($id), |
298 | 302 | // 'default' isn't in here by design: we don't want |
299 | 303 | // enabledByDefault to be honored across wikis |
300 | 304 | ); |