Commit Graph

118 Commits (e24028e9d1f85a585005da60945f745afdb72ad8)

Author SHA1 Message Date
Steven Wittens 9794b5538e - #55898: Generic, permissive admin XSS/HTML filtering for mission/footer/...
- Clean up some raw output
2006-04-07 15:32:17 +00:00
Steven Wittens abf9cee792 #56947: Restore missing filter tips (drumm) 2006-04-04 01:07:42 +00:00
Steven Wittens 5e0ea8609b Oopsie 2006-04-04 00:32:52 +00:00
Steven Wittens da38e1b654 - Store correct format id instead of 0 for anonymous users (+ code cleanup) 2006-04-03 23:59:48 +00:00
Neil Drumm 767ed120d5 #41171 James Harvard & freso@freso.dk: Add ABBR & ACRONYM to HTML tips 2006-04-02 10:12:47 +00:00
Steven Wittens fe19714805 - theme_placeholder to theme('placeholder') 2006-03-14 15:15:46 +00:00
Neil Drumm 4b663a62af #52484 by chx: filter_form needs validation 2006-03-05 02:46:55 +00:00
Dries Buytaert 650f22bc7f - Patch #52265 by Zen: converted filter.module to file API:
* Converts filter.module to the fapi model (besides filter_admin_overview which has already been done.)
    * On the format edit screen, updates to the roles fieldset were being mangled with the previous code. The previous code relied on only checked checkboxes being returned. Fapi for some reason decides to insert non-checked items as well with values 0.
    * Makes the name field a UNIQUE field. DB and update patches included. Having a duplicate format name completely b0rks things.
    * Adds check_plain to the format name in admin_overview.
    * Removes unnecessary #type => 'markup'.
    * Moves hook_menu to below hook_help.
    * drupal_goto -> return.
2006-03-04 18:12:10 +00:00
Dries Buytaert ff5f9c9ca3 - Patch #52341 by m3avrck: corrected phpdoc. 2006-03-04 17:51:34 +00:00
Dries Buytaert 26ba37823e - Patch #50982 by kuba: converted the admin filter overview page to the submit-model. 2006-03-01 09:01:34 +00:00
Gerhard Killesreiter 1091a2f059 #48710, incorrect list of roles that can use default input format, patch by RayZ 2006-02-27 14:24:54 +00:00
Steven Wittens 688197e8cd - #48997: Remove PHP notice from filter.module 2006-02-23 04:01:14 +00:00
Dries Buytaert 3603fe1bd8 - Patch #49912: www.drupal.org -> drupal.org. (Today's critical bugfix #5.) 2006-02-21 18:46:54 +00:00
Dries Buytaert dca43564df - Patch #49198 by Ber: improved documentation of filter-roles setting. 2006-02-16 15:36:31 +00:00
Steven Wittens 548e5d2b5f - #45742: XHTML slash fix. 2006-01-25 22:29:57 +00:00
Dries Buytaert f4f77fc851 - Patch #45742 by chx: fixed problem with closed tags being filtered out. 2006-01-25 19:20:28 +00:00
Dries Buytaert 8c02d4ec93 - Patch #45530 by Morbus: filter_form shouldn't default to #weight 0
When a form element doesn't specify a #weight, it is assumed internally as #weight 0. However, to ensure that our form elements display visually *as they were defined in the array* we, in form_builder, count the number of elements, divide by 1000, and set that as the weight:

# Assign a decimal placeholder weight to preserve original array order
if (!isset($form[$key]['#weight'])) {
  $form[$key]['#weight'] = $count/1000;
}

The above code will set the #weights of elements that have not defined a weight to something like 0 (first element in array definition), 0.001, 0.002, and so on. However, anytime a form element *explicitly* defines a #weight of 0, that #weight is kept at exactly 0, which would cause that form element to appear BEFORE the elements that didn't have a #weight defined (and thus received a #weight such as 0.002).

Consider the following pseudo example:

$form['game_title'] = array(
    '#type' => 'textfield',
    ...
    );
$form['game_description'] = array(
    '#type' => 'textarea',
    ...
    );
$form['game_format'] = filter_form(variable_get('game_format', NULL));
return $form;

Here, we're not definiing weights on our two textfields. We then add an filter_form. The second parameter of the filter_form is $weight, which defaults to 0. After this $form hits form_builder, we have weights 0 (game_title), 0.001 (game_description), and 0 (filter_form) respectively. This is then sorted by weight, which causes filter_form (the third element in the array) to appear BEFORE game_description (0 is lighter than 0.001).

The short lesson is: explicitly defining #weight 0 for a form element is probably a bad idea. This patch changes the default #weight of filter_form to NULL, instead of 0, and also removes any other explicit setting of #weight to 0 in core.
2006-01-20 09:04:34 +00:00
Steven Wittens 2e9bbda791 - #44772: {} -> [] (in anticipation of PHP de-deprecation) 2006-01-15 07:14:14 +00:00
Dries Buytaert 590e2d8e5f - Partial patch #43014 by wulff: added missing t() function to filter.module. 2006-01-02 10:01:03 +00:00
Steven Wittens 9ff2c1b3a8 - #42828: Auto-p destroys alphanumeric named entities like ½ 2005-12-31 04:01:38 +00:00
Steven Wittens afd8ccaf7e - #27230: Fix XHTML slash in XSS filter 2005-12-28 18:43:42 +00:00
Dries Buytaert eb412f7c7e - Patch #39179 by chx: improved validation of forms. 2005-12-19 14:30:53 +00:00
Dries Buytaert 922a46d281 - Patch #34920 by Morbus/webchick/tangent: fixed order of form fields. 2005-12-15 16:24:40 +00:00
Dries Buytaert 764f1177ef - Patch #40631 by Chris Johnson: is_array() slower than isset() or empty(). 2005-12-14 20:10:45 +00:00
Dries Buytaert d40ce21711 - Patch #40975 by chx: filter_format no longer supports multiple filtered areas. 2005-12-14 13:56:54 +00:00
Dries Buytaert fb9ff3baf9 - Patch #40628 by Jaza: added missing fieldset around filter options. 2005-12-10 19:35:13 +00:00
Dries Buytaert e6b78e287d - Patch #40351 by Richard/chx: filter_xss_bad_protocol too hungry. 2005-12-08 09:05:30 +00:00
Dries Buytaert 28fdb3975e - Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick. 2005-12-05 09:11:33 +00:00
Dries Buytaert 75d2089fba - Patch #39155 by Alex/chx: #validate, #submit, #process consistency 2005-12-03 09:44:50 +00:00
Dries Buytaert 7bdd8b3718 - Patch #39605 by Alex: remove form_filter type. 2005-12-02 15:46:46 +00:00
Dries Buytaert 16bcdbda69 - Improved the protocol whitelist code. 2005-11-30 20:16:47 +00:00
Dries Buytaert a74ebcc87a - More fixes 2005-11-30 15:31:23 +00:00
Steven Wittens 0ff2db93dd - #39362: Fix code warnings in filter.module 2005-11-30 00:12:23 +00:00
Dries Buytaert 2d0df351d7 - Various fixes. Updated CHANGELOG.txt 2005-11-29 20:17:10 +00:00
Dries Buytaert 5736cc3e94 - Patch #38349 by chx: form API bugfixes. 2005-11-23 08:21:08 +00:00
Dries Buytaert aeed4cd8e4 - Patch #35644 by webchick: forms API simplificiations. 2005-11-12 11:26:16 +00:00
Steven Wittens 76226df867 #36242: Array merge problems with module_invoke 2005-11-10 20:36:13 +00:00
Dries Buytaert c19a04e6f8 - Partial patch #34920 by tangent: improved placement of filter settings. 2005-11-09 19:25:11 +00:00
Dries Buytaert a8b218827a - Patch #26139 by webchick / Kieran / documentation team: improved admin help of core modules! / 2005-11-01 10:17:34 +00:00
Dries Buytaert 6938e6cbe8 - Patch #35320 by asimmonds: couldn't save roles in admin/filters/... 2005-10-31 13:57:17 +00:00
Dries Buytaert 98d1979699 - Patch #35596 by ccourtne: form API change introduced input format fieldset even when only 1 input format 2005-10-31 13:40:13 +00:00
Dries Buytaert f6764cfbd8 - Patch #30930 by m3avrck/deekayen: cured PHP5 warnings. 2005-10-22 15:14:46 +00:00
Dries Buytaert 75fe6b6c0a - Patch #33752 by chx, adrian, et al: another batch of form API changes/fixes. 2005-10-11 19:44:35 +00:00
Dries Buytaert 7863be5e82 - Patch #33433 by chx: fixed a number of form API problems.
* Default form value
    * Leftover debug function in form.inc
    * PHP5 issue with comment date (I got this patch from another issue)
    * Validation error fix (was calling legacy form validate)
    * Lots o' warnings on comment preview
    * Filter tips plus argument (gremlins. I swear this was not there.)
    * Message to clear what's going on with system settings
    * Non-freetagging taxonomies fixed
2005-10-08 12:21:47 +00:00
Dries Buytaert 7e1527ee61 - Patch #29465: new form API by Adrian et al.
TODO:
  + The contact.module was broken; a new patch for contact.module is needed.
  + Documentation is needed.
  + The most important modules need to be updated ASAP.
2005-10-07 06:11:12 +00:00
Dries Buytaert 53bdeae273 - Modified patch #30775 by timcn, Souvent22, m3avrck: give file uploads descriptions.
(Modified the form a bit.)
2005-09-27 15:54:39 +00:00
Dries Buytaert f0cc7b4efc - Patch #27364 by Ber, m3avrck: filter GUI improvements.
chx: it can be "form API"-ied now. :)
2005-09-17 12:44:59 +00:00
Dries Buytaert 7b8a409675 - Patch #29385 by chx: no ?> add end of files. 2005-08-25 21:14:17 +00:00
Dries Buytaert 2549e5068e - Fixed the filter module. 2005-08-14 17:50:35 +00:00
Dries Buytaert 00d21d5cee - Patch #28826 by chx: make xmlrpc_multicall working. 2005-08-14 09:53:40 +00:00