Index: mail_edit.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mail_edit/mail_edit.module,v
retrieving revision 1.4.2.3
diff -u -r1.4.2.3 mail_edit.module
--- mail_edit.module	11 Jul 2008 07:51:25 -0000	1.4.2.3
+++ mail_edit.module	13 Sep 2008 11:47:08 -0000
@@ -80,7 +80,7 @@
   $form['description'] = array(
     '#title'      => t('description'),
     '#type'       => 'textfield',
-    '#default_value' => isset($template->description) ? $template->description : (isset($mailkey_obj->description) ? $mailkey_obj->description : ''),
+    '#default_value' => isset($template->description) ? $template->description : (isset($mailkey_obj->description) ? filter_xss($mailkey_obj->description, array()) : ''),
   );
   $form['mail'] = array(
     '#type' => 'fieldset',
@@ -261,7 +261,7 @@
   foreach ($sys_keys as $key => $desc) {
     $trans_keys[$key]['description'] = $desc;
   }
-  $keys_query = "SELECT * FROM {mail_edit} ORDER BY id ASC";
+  $keys_query = "SELECT me.* FROM {mail_edit} me, {mail_edit_registry} mer WHERE me.id = mer.id ORDER BY me.id ASC";
   $keys_result = db_query($keys_query);
   while ($row = db_fetch_object($keys_result)) {
     $trans_keys[$row->id]['description'] = $row->description;
