You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/08/30 03:06:24 UTC

svn commit: r264664 - in /httpd/mod_mbox/branches/httpd-mbox-if: data/archives.js module-2.0/mbox_parse.c module-2.0/mod_mbox_file.c module-2.0/mod_mbox_index.c module-2.0/mod_mbox_out.c

Author: maxime
Date: Mon Aug 29 18:06:17 2005
New Revision: 264664

URL: http://svn.apache.org/viewcvs?rev=264664&view=rev
Log:
Still integrating fixes and comments ...

 * module-2.0/mbox_parse.c:
    (normalize_message): changed date format.

 * module-2.0/mod_mbox_file:
    (mbox_file_handler): code style fix.

 * module-2.0/mod_mbox_index.c:
    (mbox_index_handler): fixed auxiliary list addresses.

 * module-2.0/mod_mbox_out.c:
    added some CDATA markups.

 * data/archives.js:
    Moved function to make sure a function has already been define by
the time it is called.
    (checkBrowser): new function for (sic) browser detection.


Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c

Modified: httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js?rev=264664&r1=264663&r2=264664&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/data/archives.js Mon Aug 29 18:06:17 2005
@@ -17,96 +17,15 @@
 /* mod_mbox javascript functions.
  */
 
-/* onLoad function for boxes list : changes 'Threads - Date - Author'
- * links into a single 'Browser' link. */
-function indexLinks ()
+/* I *hate* doing this kind of things */
+function checkBrowser ()
 {
-  var i, entries;
-  var http = getHTTPObject ();
-
-  /* Do not change links if the browser does not support
-     XMLHttpRequest */
-  if (!http) {
-    return false;
+  /* Gecko only ... we're still working on it ! */
+  if (navigator.product == 'Gecko') {
+    return true;
   }
 
-  i = 0;
-
-  /* Fetch all spans in the document */
-  entries = document.getElementsByTagName('span');
-
-  /* Update span.links contents */
-  while (entries[i]) {
-    if (entries[i].className == 'links') {
-      entries[i].innerHTML = '<a href="' + entries[i].getAttribute('id') +
-	'.mbox/browser" title="Dynamic browser">Browse</a>';
-    }
-    i++;
-  }
-
-  return true;
-}
-
-var _mbox = '';       /* Current browsed mailbox */
-var _baseURI = '';    /* Base archives URI */
-var _sort = 'thread'; /* Sort mode defaults to 'thread' */
-var _page = 0;
-
-var _boxlist = null;
-var _msglist = null;
-
-var _default_ctx = 3;
-
-/* onLoad function for browser. Call the message list and box list
- * creation functions. */
-function loadBrowser (baseURI)
-{
-  _baseURI = baseURI.substring(0, baseURI.lastIndexOf('/')+1);
-  _mbox = baseURI.substring(baseURI.lastIndexOf('/')+1);
-
-  body = document.getElementsByTagName('body')[0];
-  body.innerHTML += '<div id="loading">Loading ...</div>';
-
-  document.getElementsByTagName('h1')[0].innerHTML += ': ' +
-    getMonthName(parseInt(_mbox.substr(4, 2), 10), true) + ' ' +
-    _mbox.substr(0, 4);
-
-  /* Get message list */
-  if (!getMsgList (null, null)) {
-    body.innerHTML += '<table id="msglist">' +
-      '<thead><tr><th>Message list</th></tr></thead>' +
-      '<tbody><tr><td>Unable to load message list for ' +
-      _mbox + ' !</td></tr></tbody></table>';
-  }
-
-  /* Get box list */
-  if (!getBoxList ()) {
-    body.innerHTML += '<table id="boxlist">' +
-      '<thead><tr><th>Box list</th></tr></thead>' +
-      '<tbody><tr><td>Unable to load box list !</td></tr></tbody>' +
-      '</table>';
-  }
-
-  return true;
-}
-
-/* Returns the textual representation of a month number. */
-function getMonthName (num, full)
-{
-  var full_months = new Array("January", "February", "March",
-			      "April", "May", "June", "July",
-			      "August", "September", "October",
-			      "November", "December");
-
-  var short_months = new Array("Jan", "Feb", "Mar", "Apr",
-			       "May", "Jun", "Jul", "Aug",
-			       "Sep", "Oct", "Nov", "Dec");
-
-  if (full) {
-    return full_months[num-1];
-  }
-
-  return short_months[num-1];
+  return false;
 }
 
 /* Returns a XmlHttpObject, or false on error. Don't forget to use
@@ -146,83 +65,65 @@
   return xmlhttp;
 }
 
-/* Retreive the message list from server, according to the sort flag
- * and page number given */
-function getMsgList (sort, page)
+/* onLoad function for boxes list : changes 'Threads - Date - Author'
+ * links into a single 'Browser' link. */
+function indexLinks ()
 {
-  var msglist_http = getHTTPObject ();
+  var i, entries;
+  var http = getHTTPObject ();
 
-  if (!msglist_http) {
+  /* Do not change links if the browser does not support
+     XMLHttpRequest */
+  if (!checkBrowser () || !http) {
     return false;
   }
 
-  if (!sort) {
-    sort = _sort;
-  }
-  if (!page) {
-    page = _page;
-  }
-
-  _page = page;
-  _sort = sort;
-
-  /* The handler */
-  msglist_http.onreadystatechange = function () {
-    if (msglist_http.readyState == 4) { /* 4 : "complete" */
-      if (msglist_http.status == 200) { /* 200 : OK */
-	_msglist = msglist_http.responseXML.documentElement;
-	var i;
+  i = 0;
 
-	drawFullMsgList ();
+  /* Fetch all spans in the document */
+  entries = document.getElementsByTagName('span');
 
-	/* Remove now useless loading message */
-	body.removeChild(document.getElementById('loading'));
-      }
+  /* Update span.links contents */
+  while (entries[i]) {
+    if (entries[i].className == 'links') {
+      entries[i].innerHTML = '<a href="' + entries[i].getAttribute('id') +
+	'.mbox/browser" title="Dynamic browser">Browse</a>';
     }
+    i++;
   }
 
-  msglist_http.open('GET', 'ajax/' + sort + '?' + page, true);
-  msglist_http.send(null);
-
   return true;
 }
 
-function drawFullMsgList ()
-{
-  /* Destroy previous message view if displayed */
-  if (document.getElementById('msgview')) {
-    body.removeChild(document.getElementById('msgview'));
-  }
-
-  /* Get an array of all messages */
-  var msgs = _msglist.getElementsByTagName('message');
-
-  /* Create the destination table */
-  var msglist = document.createElement('table');
-  msglist.setAttribute('id', 'msglist');
+var _mbox = '';       /* Current browsed mailbox */
+var _baseURI = '';    /* Base archives URI */
+var _sort = 'thread'; /* Sort mode defaults to 'thread' */
+var _page = 0;
 
-  var str = getMsgListHeader ();
+var _boxlist = null;
+var _msglist = null;
 
-  /* Build message list entries */
-  str += '<tbody>';
+var _default_ctx = 3;
 
-  i = 0;
-  while (msgs[i]) {
-    str += buildMessageListEntry (msgs[i], i);
-    i++;
-  }
+/* Returns the textual representation of a month number. */
+function getMonthName (num, full)
+{
+  var full_months = new Array("January", "February", "March",
+			      "April", "May", "June", "July",
+			      "August", "September", "October",
+			      "November", "December");
 
-  str += '</tbody>';
-  msglist.innerHTML = str;
+  var short_months = new Array("Jan", "Feb", "Mar", "Apr",
+			       "May", "Jun", "Jul", "Aug",
+			       "Sep", "Oct", "Nov", "Dec");
 
-  if (document.getElementById('msglist')) {
-    body.removeChild(document.getElementById('msglist'));
+  if (full) {
+    return full_months[num-1];
   }
 
-  body.appendChild(msglist);
+  return short_months[num-1];
 }
 
-
 /* Returns the message list table header, including page selector and
  * sort links */
 function getMsgListHeader ()
@@ -295,15 +196,10 @@
 function buildMessageListEntry (msg, msg_num)
 {
   var linked = parseInt(msg.getAttribute('linked'));
-  var str = '';
+  var depth  = parseInt(msg.getAttribute('depth'));
   var i;
 
-  if (linked) {
-    str += '<tr id="' + msg.getAttribute('id') + '">';
-  }
-  else {
-    str += '<tr>';
-  }
+  var str = '<tr>';
 
   /* The author */
   str += '<td class="author">';
@@ -314,7 +210,7 @@
 
   /* The subject */
   str += '<td class="subject">';
-  for (i=0 ; i<msg.getAttribute('depth') ; i++) {
+  for (i=0 ; i<depth ; i++) {
     str += '&nbsp;&nbsp;';
   }
 
@@ -342,61 +238,133 @@
   return str;
 }
 
-/* Toggle the view of a message. Change the message list into a
- * context view, and call message view table creation. */
-function toggleMessage (msg_num)
+function drawFullMsgList ()
 {
-  var msgs = _msglist.getElementsByTagName('message');
-  var id = msgs[msg_num].getAttribute('id');
-  var i;
-
-  var min = msg_num - _default_ctx;
-  var max = msg_num + _default_ctx;
-
-  /* Check context id values */
-  if (min < 0) {
-    min = 0;
+  /* Destroy previous message view if displayed */
+  if (document.getElementById('msgview')) {
+    body.removeChild(document.getElementById('msgview'));
   }
 
-  /* Destroy previous message list table */
-  if (document.getElementById('msglist')) {
-    body.removeChild(document.getElementById('msglist'));
-  }
+  /* Get an array of all messages */
+  var msgs = _msglist.getElementsByTagName('message');
 
+  /* Create the destination table */
   var msglist = document.createElement('table');
   msglist.setAttribute('id', 'msglist');
 
   var str = getMsgListHeader ();
+
+  /* Build message list entries */
   str += '<tbody>';
 
-  /* Build list */
-  for (i=min ; i<=max ; i++) {
-    if (msgs[i]) {
-      str += buildMessageListEntry (msgs[i], i);
-    }
+  i = 0;
+  while (msgs[i]) {
+    str += buildMessageListEntry (msgs[i], i);
+    i++;
   }
 
-  str += '</tbody></table>';
+  str += '</tbody>';
   msglist.innerHTML = str;
+
+  if (document.getElementById('msglist')) {
+    body.removeChild(document.getElementById('msglist'));
+  }
+
   body.appendChild(msglist);
-  document.getElementById(id).setAttribute('class', 'msgactive');
+}
 
-  /* Display a loading box ... */
-  body.innerHTML += '<div id="loading">Loading ...</div>';
+/* Retreive the message list from server, according to the sort flag
+ * and page number given */
+function getMsgList (sort, page)
+{
+  var msglist_http = getHTTPObject ();
 
-  /* Now, display the message */
-  if (document.getElementById('msgview')) {
-    body.removeChild(document.getElementById('msgview'));
+  if (!msglist_http) {
+    return false;
   }
 
-  if (!getMessage (id, msg_num)) {
-    body.innerHTML += '<table class="js" id="msgview">' +
-      '<thead><tr><th>Message view</th></tr></thead>' +
-      '<tbody><tr><td>Unable to load message ' + id + ' !</td></tr></tbody>' +
-      '</table>';
+  if (!sort) {
+    sort = _sort;
   }
+  if (!page) {
+    page = _page;
+  }
+
+  _page = page;
+  _sort = sort;
+
+  /* The handler */
+  msglist_http.onreadystatechange = function () {
+    if (msglist_http.readyState == 4) { /* 4 : "complete" */
+      if (msglist_http.status == 200) { /* 200 : OK */
+	_msglist = msglist_http.responseXML.documentElement;
+	var i;
+
+	drawFullMsgList ();
+
+	/* Remove now useless loading message */
+	body.removeChild(document.getElementById('loading'));
+      }
+    }
+  }
+
+  msglist_http.open('GET', 'ajax/' + sort + '?' + page, true);
+  msglist_http.send(null);
+
+  return true;
 }
 
+/* Parses the message's MIME structure. This is a recursive function,
+   maybe we should flatten it. */
+function parseMimeStructure (id, mime)
+{
+  var count = 0;
+  var i = 0;
+  var str = '';
+
+  while (mime[i]) {
+    /* If the node is a MIME part, output its entry */
+    if (mime[i].nodeName == "part") {
+      var length = parseInt(mime[i].getAttribute('length'));
+
+      str += '<li>';
+
+      if (length) {
+	str += '<a href="' + _baseURI + _mbox + '/raw/' + id +
+	  mime[i].getAttribute('link') + '" target="_blank">';
+      }
+
+      var name = mime[i].getAttribute('name');
+      if (name) {
+	str += name;
+      }
+      else {
+	str += 'Unnamed ' + mime[i].getAttribute('ct');
+      }
+
+      if (length) {
+	str += '</a>';
+      }
+
+      str += ' (' + mime[i].getAttribute('cd') + ', ' +
+	mime[i].getAttribute('cte') + ', ' + length + ' bytes)</li>';
+
+      count++;
+    }
+
+    /* Otherwise it's a MIME multipart, recurse */
+    else if (mime[i].nodeName == "mime") {
+      str += '<ul>' +
+	parseMimeStructure (id, mime[i].childNodes) + '</ul>';
+    }
+
+    i++;
+  }
+
+  return str;
+}
+
+/* Get a message */
 function getMessage (id, msg_num)
 {
   var message_http = getHTTPObject ();
@@ -477,52 +445,59 @@
   return true;
 }
 
-function parseMimeStructure (id, mime)
+/* Toggle the view of a message. Change the message list into a
+ * context view, and call message view table creation. */
+function toggleMessage (msg_num)
 {
-  var count = 0;
-  var i = 0;
-  var str = '';
-
-  while (mime[i]) {
-    /* If the node is a MIME part, output its entry */
-    if (mime[i].nodeName == "part") {
-      var length = parseInt(mime[i].getAttribute('length'));
+  var msgs = _msglist.getElementsByTagName('message');
+  var id = msgs[msg_num].getAttribute('id');
+  var i;
 
-      str += '<li>';
+  var min = msg_num - _default_ctx;
+  var max = msg_num + _default_ctx;
 
-      if (length) {
-	str += '<a href="' + _baseURI + _mbox + '/raw/' + id +
-	  mime[i].getAttribute('link') + '" target="_blank">';
-      }
+  /* Check context id values */
+  if (min < 0) {
+    min = 0;
+  }
 
-      var name = mime[i].getAttribute('name');
-      if (name) {
-	str += name;
-      }
-      else {
-	str += 'Unnamed ' + mime[i].getAttribute('ct');
-      }
+  /* Destroy previous message list table */
+  if (document.getElementById('msglist')) {
+    body.removeChild(document.getElementById('msglist'));
+  }
 
-      if (length) {
-	str += '</a>';
-      }
+  var msglist = document.createElement('table');
+  msglist.setAttribute('id', 'msglist');
 
-      str += ' (' + mime[i].getAttribute('cd') + ', ' +
-	mime[i].getAttribute('cte') + ', ' + length + ' bytes)</li>';
+  var str = getMsgListHeader ();
+  str += '<tbody>';
 
-      count++;
+  /* Build list */
+  for (i=min ; i<=max ; i++) {
+    if (msgs[i]) {
+      str += buildMessageListEntry (msgs[i], i);
     }
+  }
 
-    /* Otherwise it's a MIME multipart, recurse */
-    else if (mime[i].nodeName == "mime") {
-      str += '<ul>' +
-	parseMimeStructure (id, mime[i].childNodes) + '</ul>';
-    }
+  str += '</tbody></table>';
+  msglist.innerHTML = str;
+  body.appendChild(msglist);
+  document.getElementById(id).setAttribute('class', 'msgactive');
 
-    i++;
+  /* Display a loading box ... */
+  body.innerHTML += '<div id="loading">Loading ...</div>';
+
+  /* Now, display the message */
+  if (document.getElementById('msgview')) {
+    body.removeChild(document.getElementById('msgview'));
   }
 
-  return str;
+  if (!getMessage (id, msg_num)) {
+    body.innerHTML += '<table class="js" id="msgview">' +
+      '<thead><tr><th>Message view</th></tr></thead>' +
+      '<tbody><tr><td>Unable to load message ' + id + ' !</td></tr></tbody>' +
+      '</table>';
+  }
 }
 
 function closeMessage ()
@@ -541,6 +516,43 @@
   drawFullMsgList ();
 }
 
+function buildBoxListEntry (box)
+{
+  var id = box.getAttribute('id');
+  var str = '';
+
+  /* If the mbox id is the same as the one who called the
+     browser, set the entry as active */
+  if (id == _mbox) {
+    str += '<tr id="boxactive">';
+  }
+  else {
+    str += '<tr>';
+  }
+
+  /* Build link (_baseURI/id/browser) */
+  str += '<td class="box">';
+
+  if (id == _mbox) {
+    str += '<a href="browser" onclick="javascript:drawFullMsgList(); return false;">';
+  }
+  else {
+    str += '<a href="' + _baseURI + id + '/browser">';
+  }
+
+  /* Display month name (short text) and year. The decimal
+     base (10) is passed to parseInt in order to avoid octal
+     parsing due to leading 0. */
+  str += getMonthName(parseInt(id.substr(4, 2), 10), false) +
+    ' ' + id.substr(0, 4) + '</a></td>';
+
+  /* Finally end the entry with the message count */
+  str += '<td class="msgcount">' + box.getAttribute('count') +
+    '</td></tr>';
+
+  return str;
+}
+
 /* Retreive and parse the box list.
  */
 function getBoxList ()
@@ -588,39 +600,40 @@
   return true;
 }
 
-function buildBoxListEntry (box)
+/* onLoad function for browser. Call the message list and box list
+ * creation functions. */
+function loadBrowser (baseURI)
 {
-  var id = box.getAttribute('id');
-  var str = '';
+  _baseURI = baseURI.substring(0, baseURI.lastIndexOf('/')+1);
+  _mbox = baseURI.substring(baseURI.lastIndexOf('/')+1);
 
-  /* If the mbox id is the same as the one who called the
-     browser, set the entry as active */
-  if (id == _mbox) {
-    str += '<tr id="boxactive">';
-  }
-  else {
-    str += '<tr>';
+  if (!checkBrowser ()) {
+    window.location = _baseURI + _mbox + '/' + _sort;
+    return true;
   }
 
-  /* Build link (_baseURI/id/browser) */
-  str += '<td class="box">';
+  body = document.getElementsByTagName('body')[0];
+  body.innerHTML += '<div id="loading">Loading ...</div>';
 
-  if (id == _mbox) {
-    str += '<a href="browser" onclick="javascript:drawFullMsgList(); return false;">';
-  }
-  else {
-    str += '<a href="' + _baseURI + id + '/browser">';
-  }
+  document.getElementsByTagName('h1')[0].innerHTML += ': ' +
+    getMonthName(parseInt(_mbox.substr(4, 2), 10), true) + ' ' +
+    _mbox.substr(0, 4);
 
-  /* Display month name (short text) and year. The decimal
-     base (10) is passed to parseInt in order to avoid octal
-     parsing due to leading 0. */
-  str += getMonthName(parseInt(id.substr(4, 2), 10), false) +
-    ' ' + id.substr(0, 4) + '</a></td>';
+  /* Get message list */
+  if (!getMsgList (null, null)) {
+    body.innerHTML += '<table id="msglist">' +
+      '<thead><tr><th>Message list</th></tr></thead>' +
+      '<tbody><tr><td>Unable to load message list for ' +
+      _mbox + ' !</td></tr></tbody></table>';
+  }
 
-  /* Finally end the entry with the message count */
-  str += '<td class="msgcount">' + box.getAttribute('count') +
-    '</td></tr>';
+  /* Get box list */
+  if (!getBoxList ()) {
+    body.innerHTML += '<table id="boxlist">' +
+      '<thead><tr><th>Box list</th></tr></thead>' +
+      '<tbody><tr><td>Unable to load box list !</td></tr></tbody>' +
+      '</table>';
+  }
 
-  return str;
+  return true;
 }

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c?rev=264664&r1=264663&r2=264664&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c Mon Aug 29 18:06:17 2005
@@ -516,7 +516,7 @@
     m->rfc822_date = (char*)apr_pcalloc(r->pool, APR_RFC822_DATE_LEN);
 
     apr_strftime(m->str_date, &len, APR_RFC822_DATE_LEN,
-		 "%A %d, %T", &time_exp);
+		 "%a, %d %b, %H:%M", &time_exp);
     apr_rfc822_date(m->rfc822_date, m->date);
 
     /* Parse the references into a table. */

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c?rev=264664&r1=264663&r2=264664&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c Mon Aug 29 18:06:17 2005
@@ -270,8 +270,9 @@
 	else
 	    status = mbox_xml_message(r, f);
     }
-    else if (strncmp(r->path_info, "/raw", 4) == 0)
-      status = mbox_raw_message(r, f);
+    else if (strncmp(r->path_info, "/raw", 4) == 0) {
+        status = mbox_raw_message(r, f);
+    }
     else {
 	/* Set content type */
 	r->content_type = "text/html";

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c?rev=264664&r1=264663&r2=264664&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c Mon Aug 29 18:06:17 2005
@@ -161,22 +161,22 @@
 	       ESCAPE_OR_BLANK(r->pool, mli->domain));
 
     ap_rprintf(r, "    <tr><td class=\"left\">Subscribe</td>"
-	       "<td class=\"right\">subscribe-%s@%s</td></tr>\n",
+	       "<td class=\"right\">%s-subscribe@%s</td></tr>\n",
 	       ESCAPE_OR_BLANK(r->pool, mli->list),
 	       ESCAPE_OR_BLANK(r->pool, mli->domain));
 
     ap_rprintf(r, "    <tr><td class=\"left\">Digest</td>"
-	       "<td class=\"right\">digest-subscribe-%s@%s</td></tr>\n",
+	       "<td class=\"right\">%s-digest-subscribe@%s</td></tr>\n",
 	       ESCAPE_OR_BLANK(r->pool, mli->list),
 	       ESCAPE_OR_BLANK(r->pool, mli->domain));
 
     ap_rprintf(r, "    <tr><td class=\"left\">Unsubscribe</td>"
-	       "<td class=\"right\">unsubscribe-%s@%s</td></tr>\n",
+	       "<td class=\"right\">%s-unsubscribe@%s</td></tr>\n",
 	       ESCAPE_OR_BLANK(r->pool, mli->list),
 	       ESCAPE_OR_BLANK(r->pool, mli->domain));
 
     ap_rprintf(r, "    <tr><td class=\"left\">Help</td>"
-	       "<td class=\"right\">help-%s@%s</td></tr>\n",
+	       "<td class=\"right\">%s-help@%s</td></tr>\n",
 	       ESCAPE_OR_BLANK(r->pool, mli->list),
 	       ESCAPE_OR_BLANK(r->pool, mli->domain));
 

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c?rev=264664&r1=264663&r2=264664&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c Mon Aug 29 18:06:17 2005
@@ -348,9 +348,9 @@
 	       linked, depth, URI_ESCAPE_OR_BLANK(r->pool, m->msgID));
 
     ap_rprintf(r, "  <from><![CDATA[%s]]></from>\n", from);
-    ap_rprintf(r, "  <date>%s</date>\n", ESCAPE_OR_BLANK(r->pool, m->str_date));
+    ap_rprintf(r, "  <date><![CDATA[%s]]></date>\n", ESCAPE_OR_BLANK(r->pool, m->str_date));
 
-    ap_rprintf(r, "  <subject>%s</subject>\n", ESCAPE_OR_BLANK(r->pool, m->subject));
+    ap_rprintf(r, "  <subject><![CDATA[%s]]></subject>\n", ESCAPE_OR_BLANK(r->pool, m->subject));
     ap_rprintf(r, " </message>\n");
 }
 
@@ -1042,7 +1042,7 @@
     ap_rprintf(r, "<mail id=\"%s\">\n"
 	       " <from><![CDATA[%s]]></from>\n"
 	       " <subject><![CDATA[%s]]></subject>\n"
-	       " <date>%s</date>\n"
+	       " <date><![CDATA[%s]]></date>\n"
 	       " <contents><![CDATA[",
 	       URI_ESCAPE_OR_BLANK(r->pool, m->msgID),
 	       from,