The return value is documented as "HTML for the form element", but it would seem that it returns an array that is an abstract representation of an HTML form element, not the HTML itself

Comments

jhodgdon’s picture

Version: 6.x-dev » 7.x-dev
Issue tags: +Novice

Good catch! This is wrong in both Drupal 7 http://api.drupal.org/api/function/filter_form/7 and Drupal 6 http://api.drupal.org/api/function/filter_form/6 and should be fixed in Drupal 7 first, then the fix should be backported to Drupal 6.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Here's a patch for Drupal 7. Should be ported to Drupal 6 if accepted.

dries’s picture

Version: 7.x-dev » 6.x-dev
Status: Needs review » Needs work

Committed to CVS HEAD. Moving to D6 so we can reroll for D6.

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new1.68 KB

Here's a doc patch for Drupal 6. Since the original doc for D6 has a see also to a validation function, I decided that validation function needed a doc header as well...

Freso’s picture

Status: Needs review » Needs work
+++ modules/filter/filter.module	23 Oct 2009 14:24:23 -0000
@@ -470,18 +470,23 @@
+ * @see filter_form_validate().
  *
- * @ingroup forms
- * @see filter_form_validate()
  * @param $value
[...]
+ *
+ * @ingroup forms

Nit-pick: The @see should probably move back down beneath the @ingroup, unless I've missed some code style discussion. :x

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new1.67 KB

Fair enough. Here's a redo.

jhodgdon’s picture

StatusFileSize
new1.67 KB

I just noticed an extra space. Try this patch instead.

Freso’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

Automatically closed -- issue fixed for 2 weeks with no activity.