Index: mollom.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.inc,v
retrieving revision 1.4
diff -u -p -r1.4 mollom.inc
--- mollom.inc	29 Jan 2010 20:26:54 -0000	1.4
+++ mollom.inc	15 Aug 2010 17:41:31 -0000
@@ -71,7 +71,7 @@ function _mollom_retrieve_server_list() 
 
   // Use the list of servers to retrieve a list of servers from mollom.com:
   foreach ($servers as $server) {
-    $result = xmlrpc($server . '/' . MOLLOM_API_VERSION, 'mollom.getServerList', _mollom_authentication());
+    $result = xmlrpc($server . '/' . MOLLOM_API_VERSION, array('mollom.getServerList' => array(_mollom_authentication())));
     if (!xmlrpc_error()) {
       return $result;
     }
Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.66
diff -u -p -r1.66 mollom.module
--- mollom.module	10 Aug 2010 19:33:51 -0000	1.66
+++ mollom.module	15 Aug 2010 17:42:32 -0000
@@ -882,14 +882,14 @@ function mollom_form_get_values($form_va
     // $mapping with the actual form element value, and continue to the next
     // field. Also unset this field from $exclude_fields, so we can process the
     // remaining mappings below.
-    if (isset($exclude_fields[$field])) {
+    if (isset($exclude_fields[$field]) && drupal_validate_utf8($value)) {
       $mapping[$exclude_fields[$field]] = $value;
       unset($exclude_fields[$field]);
       continue;
     }
     // Only add form element values that are not empty.
     if (isset($value)) {
-      if (is_string($value) && drupal_strlen($value)) {
+      if (is_string($value) && drupal_validate_utf8($value) && drupal_strlen($value)) {
         $post_body[$field] = $value;
       }
       // Recurse into nested values (e.g. multiple value fields).
@@ -897,7 +897,9 @@ function mollom_form_get_values($form_va
         // Ensure we have a flat array to implode(); form values of
         // field_attach_form() use several subkeys.
         _mollom_flatten_form_values($value);
-        $post_body[$field] = implode("\n", $value);
+        if (($value = implode("\n", $value)) && drupal_validate_utf8($value)) {
+          $post_body[$field] = $value;
+        }
       }
     }
   }
@@ -913,7 +915,7 @@ function mollom_form_get_values($form_va
     foreach ($parents as $key) {
       $value = isset($value[$key]) ? $value[$key] : NULL;
     }
-    if (isset($value)) {
+    if (isset($value) && drupal_validate_utf8($value)) {
       $mapping[$property] = $value;
     }
   }
@@ -1451,7 +1453,9 @@ function mollom($method, $data = array()
     // servers in the list.
     reset($servers);
     while ($server = current($servers)) {
-      $result = xmlrpc($server . '/' . MOLLOM_API_VERSION, $method, $data + _mollom_authentication());
+      $result = xmlrpc($server . '/' . MOLLOM_API_VERSION, array(
+        $method => array($data + _mollom_authentication()),
+      ));
 
       if ($result === FALSE && ($error = xmlrpc_error())) {
         if ($error->code === MOLLOM_REFRESH) {
