When a form contains other form submit buttons, their labels are included as part of the post_body that is sent to Mollom.
An example for this is the mollom_test_form; it contains the button label "Add" in the post_body.
In D7, we can leverage form_state_values_clean() on a copy of $form_state['values'].
For D6, we need to backport that core helper function.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | mollom.form-button-values.8.patch | 10.84 KB | sun |
| #6 | mollom.form-button-values.6.patch | 8.86 KB | sun |
| #3 | mollom.form-button-values.3.patch | 6.28 KB | sun |
| #1 | mollom.form-button-values.1.patch | 5.6 KB | sun |
Comments
Comment #1
sunAttached patch fixes the issue.
Comment #3
sunComment #4
sunComment #5
dries commentedCommitted to 7.x (master). Thanks sun!
I'm not sure it is important enough to backport to 6.x. Seems pretty harmless.
Comment #6
sunI think it's important, since the button labels are not user input. Mollom's content classifiers take them into account when evaluating the spaminess, profanity, and quality of a post. I've seen such text fragments in several customer support tickets. Now, when considering that millions of posts are determined as spam every day, and these tokens get a negative spam classification, then there's a higher probability of mistakenly identifying a ham post as spam, just because of the button labels.
Comment #8
sunform_builder() in D6 destroys the $form_state['buttons'] information as soon as a button has been processed, so the backport wasn't trivial. However, attached patch should fix the issue.
Comment #9
sunComment #10
sunThanks for reporting, reviewing, and testing! Committed to 6.x-1.x.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.