--- mt.js.orig	Sat Apr 30 00:21:21 2005
+++ mt.js	Sat Apr 30 02:40:34 2005
@@ -203,3 +203,92 @@
         for (i=0; i<e.length; i++) 
             e[i].checked = v;
 }
+
+window.onload = function () {
+
+  var bold_button = document.createElement('a');
+  bold_button.setAttribute('title','Bold');
+  bold_button.setAttribute('href','#');
+  bold_button.setAttribute('onclick','return formatStr(document.entry_form.text, \'strong\')');
+  var bold_img = document.createElement('img');
+  bold_img.setAttribute('src','/MT-static/3.0/images/html-bold.gif');
+  bold_img.setAttribute('alt','Bold');
+  bold_img.setAttribute('width','22');
+  bold_img.setAttribute('height','16');
+  bold_button.appendChild(bold_img);
+
+  var italic_button = document.createElement('a');
+  italic_button.setAttribute('title','Italic');
+  italic_button.setAttribute('href','#');
+  italic_button.setAttribute('onclick','return formatStr(document.entry_form.text, \'em\')');
+  var italic_img = document.createElement('img');
+  italic_img.setAttribute('src','/MT-static/3.0/images/html-italic.gif');
+  italic_img.setAttribute('alt','Italic');
+  italic_img.setAttribute('width','22');
+  italic_img.setAttribute('height','16');
+  italic_button.appendChild(italic_img);
+
+  var underline_button = document.createElement('a');
+  underline_button.setAttribute('title','Underline');
+  underline_button.setAttribute('href','#');
+  underline_button.setAttribute('onclick','return formatStr(document.entry_form.text, \'u\')');
+  var underline_img = document.createElement('img');
+  underline_img.setAttribute('src','/MT-static/3.0/images/html-underline.gif');
+  underline_img.setAttribute('alt','Underline');
+  underline_img.setAttribute('width','22');
+  underline_img.setAttribute('height','16');
+  underline_button.appendChild(underline_img);
+
+  link_button = document.createElement('a');
+  link_button.setAttribute('title','Insert Link');
+  link_button.setAttribute('href','#');
+  link_button.setAttribute('onclick','return insertLink(document.entry_form.text)');
+  link_img = document.createElement('img');
+  link_img.setAttribute('src','/MT-static/3.0/images/html-link.gif');
+  link_img.setAttribute('alt','Insert Link');
+  link_img.setAttribute('width','22');
+  link_img.setAttribute('height','16');
+  link_button.appendChild(link_img);
+
+  var email_button = document.createElement('a');
+  email_button.setAttribute('title','Insert Email Link');
+  email_button.setAttribute('href','#');
+  email_button.setAttribute('onclick','return insertLink(document.entry_form.text, 1)');
+  var email_img = document.createElement('img');
+  email_img.setAttribute('src','/MT-static/3.0/images/html-email.gif');
+  email_img.setAttribute('alt','Insert Email Link');
+  email_img.setAttribute('width','22');
+  email_img.setAttribute('height','16');
+  email_button.appendChild(email_img);
+
+  var quote_button = document.createElement('a');
+  quote_button.setAttribute('title','Quote');
+  quote_button.setAttribute('href','#');
+  quote_button.setAttribute('onclick','return formatStr(document.entry_form.text, \'blockquote\')');
+  var quote_img = document.createElement('img');
+  quote_img.setAttribute('src','/MT-static/3.0/images/html-quote.gif');
+  quote_img.setAttribute('alt','Quote');
+  quote_img.setAttribute('width','22');
+  quote_img.setAttribute('height','16');
+  quote_button.appendChild(quote_img);
+
+  var div, divs = document.getElementsByTagName('div');
+  for (i=0; i <= divs.length; i++ ) {
+    div = divs[i];
+    if ( div.getAttribute('class') == 'field-buttons' ) {
+      div.appendChild(bold_button.cloneNode(true));
+      div.appendChild(italic_button.cloneNode(true));
+      div.appendChild(underline_button.cloneNode(true));
+      div.appendChild(link_button.cloneNode(true));
+      div.appendChild(email_button.cloneNode(true));
+      div.appendChild(quote_button.cloneNode(true));
+      bold_button.setAttribute('onclick','return formatStr(document.entry_form.text_more, \'strong\')');
+      italic_button.setAttribute('onclick','return formatStr(document.entry_form.text_more, \'em\')');
+      underline_button.setAttribute('onclick','return formatStr(document.entry_form.text_more, \'u\')');
+      link_button.setAttribute('onclick','return insertLink(document.entry_form.text_more)');
+      email_button.setAttribute('onclick','return insertLink(document.entry_form.text_more, 1)');
+      quote_button.setAttribute('onclick','return formatStr(document.entry_form.text_more, \'blockquote\')');
+    }
+  }
+
+}
--- tmpl/cms/menu.tmpl.orig	Sat Apr 30 03:45:13 2005
+++ tmpl/cms/menu.tmpl	Sat Apr 30 03:46:47 2005
@@ -15,7 +15,7 @@
 </TMPL_LOOP>
 </table>
 </div>
-<p align="center"><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_entries&blog_id=<TMPL_VAR NAME=BLOG_ID>">[<MT_TRANS phrase="View all Entries">]</a></p>
+<p align="center"><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_entries&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>">[<MT_TRANS phrase="View all Entries">]</a></p>
 </div>
 </div>
 
@@ -52,7 +52,7 @@
 </TMPL_LOOP>
 </table>
 </div>
-<p align="center"><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&blog_id=<TMPL_VAR NAME=BLOG_ID>">[<MT_TRANS phrase="View all TrackBacks">]</a></p>
+<p align="center"><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>">[<MT_TRANS phrase="View all TrackBacks">]</a></p>
 </div>
 </div>
 </TMPL_IF>
@@ -76,7 +76,7 @@
 <TMPL_IF NAME=CAN_EDIT_CONFIG>
 <p><MT_TRANS phrase="This welcome message is configurable."></p>
 
-<p><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=cfg_prefs&blog_id=<TMPL_VAR NAME=BLOG_ID>#welcome_msg"><MT_TRANS phrase="Change this message."></a></p>
+<p><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=cfg_prefs&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>#welcome_msg"><MT_TRANS phrase="Change this message."></a></p>
 
 </TMPL_IF>
 </TMPL_IF>
@@ -85,7 +85,7 @@
 <div style="border: 1px solid black; padding: 6px; margin-top:60px">
 <MT_TRANS phrase="Plugin actions">: <br />
 <TMPL_LOOP NAME=PLUGIN_ACTION_LOOP>
-<a href="<TMPL_VAR NAME=PAGE>&from=blog_home;blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=LINK_TEXT></a> <br />
+<a href="<TMPL_VAR NAME=PAGE>&amp;from=blog_home;blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=LINK_TEXT></a> <br />
 </TMPL_LOOP>
 </div>
 </TMPL_IF>
--- tmpl/cms/edit_entry.tmpl.orig	Thu Apr 21 01:15:51 2005
+++ tmpl/cms/edit_entry.tmpl	Sat Apr 30 00:58:53 2005
@@ -3,24 +3,23 @@
 <div id="edit-entry">
 
 <script type="text/javascript">
-<!--
 
 function listPreviousPings () {
-    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=pinged_urls&entry_id=<TMPL_VAR NAME=ID>&blog_id=<TMPL_VAR NAME=BLOG_ID>', 'urls', 'width=370,height=250,resizable=yes,scrollbars=yes');
+    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=pinged_urls&amp;entry_id=<TMPL_VAR NAME=ID>&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'urls', 'width=370,height=250,resizable=yes,scrollbars=yes');
 }
 
 function editPlacements () {
-    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=edit_placements&entry_id=<TMPL_VAR NAME=ID>&blog_id=<TMPL_VAR NAME=BLOG_ID>', 'placements', 'width=550,height=520,resizable=yes');
+    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=edit_placements&amp;entry_id=<TMPL_VAR NAME=ID>&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'placements', 'width=550,height=520,resizable=yes');
 }
 
 function doRebuildThis () {
-    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_rebuild&blog_id=<TMPL_VAR NAME=BLOG_ID>&next=0&type=entry-<TMPL_VAR NAME=ID>&entry_id=<TMPL_VAR NAME=ID>', 'rebuild', 'width=400,height=250,resizable=yes');
+    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_rebuild&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;next=0&amp;type=entry-<TMPL_VAR NAME=ID>&amp;entry_id=<TMPL_VAR NAME=ID>', 'rebuild', 'width=400,height=250,resizable=yes');
 }
 
 function doAddCategory (s) {
     if (s.options[s.selectedIndex].text != '<MT_TRANS phrase="Add new category...">')
         return;
-    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=category_add&blog_id=<TMPL_VAR NAME=BLOG_ID>', 'category_add', 'width=400,height=350,resizable=yes');
+    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=category_add&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'category_add', 'width=400,height=350,resizable=yes');
 }
 
 function doAddCategoryItem (label, value) {
@@ -52,7 +51,6 @@
     }
 }
 
-//-->
 </script>
 
 <TMPL_IF NAME=NEW_OBJECT>
@@ -179,20 +177,6 @@
 <div class="field-header">
 <div class="field-label"><label for="text"><MT_TRANS phrase="Entry Body"></label></div>
 <div class="field-buttons">
-<script type="text/javascript">
-<!--
-if (canFormat) {
-    with (document) {
-        write('<a title="<MT_TRANS phrase="Bold" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'strong\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-bold.gif" alt="<MT_TRANS phrase="Bold" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Italic" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'em\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-italic.gif" alt="<MT_TRANS phrase="Italic" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Underline" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'u\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-underline.gif" alt="<MT_TRANS phrase="Underline" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Insert Link" escape="singlequotes">" href="#" onclick="return insertLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-link.gif" alt="<MT_TRANS phrase="Insert Link" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" href="#" onclick="return insertLink(document.entry_form.text, 1)"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-email.gif" alt="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Quote" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote" escape="singlequotes">" width="22" height="16" /></a>');
-    }
-}
-// -->
-</script>
 </div>
 </div>
 <textarea onkeypress="mtShortCuts(event)" class="full-width" name="text" id="text" tabindex="3" rows="<TMPL_IF NAME=DISP_PREFS_SHOW_EXTENDED>10<TMPL_ELSE>20</TMPL_IF>"><TMPL_VAR NAME=TEXT ESCAPE=HTML></textarea>
@@ -203,20 +187,6 @@
 <div class="field-header">
 <div class="field-label"><label for="text_more"><MT_TRANS phrase="Extended Entry"></label> <a href="#" onclick="return openManual('entries', 'item_main_entry_text')" class="help">?</a></div>
 <div class="field-buttons">
-<script type="text/javascript">
-<!--
-if (canFormat) {
-    with (document) {
-        write('<a title="<MT_TRANS phrase="Bold" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text_more, \'strong\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-bold.gif" alt="<MT_TRANS phrase="Bold" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Italic" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text_more, \'em\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-italic.gif" alt="<MT_TRANS phrase="Italic" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Underline" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text_more, \'u\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-underline.gif" alt="<MT_TRANS phrase="Underline" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Insert Link" escape="singlequotes">" href="#" onclick="return insertLink(document.entry_form.text_more)"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-link.gif" alt="<MT_TRANS phrase="Insert Link" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" href="#" onclick="return insertLink(document.entry_form.text_more, 1)"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-email.gif" alt="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" width="22" height="16" /></a>');
-        write('<a title="<MT_TRANS phrase="Quote" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote" escape="singlequotes">" width="22" height="16" /></a>');
-    }
-}
-// -->
-</script>
 </div>
 </div>
 <textarea onkeypress="mtShortCuts(event)" class="full-width" name="text_more" id="text_more" tabindex="4" rows="15"><TMPL_VAR NAME=TEXT_MORE ESCAPE=HTML></textarea>
@@ -401,7 +371,7 @@
 </div>
 
 <div align="right">
-<input type="button" onclick="doRemoveItems(this.form, 'ping&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&_return=edit_entry', 'TrackBack pings')" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doRemoveItems(this.form, 'ping&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;_return=edit_entry', 'TrackBack pings')" value="<MT_TRANS phrase="Delete">" />
 </div>
 </form>
 </div>
--- tmpl/cms/header-popup.tmpl.orig	Thu Apr 21 01:24:11 2005
+++ tmpl/cms/header-popup.tmpl	Thu Apr 21 01:25:03 2005
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=<TMPL_VAR NAME=LANGUAGE_ENCODING>" />
 <title><TMPL_LOOP NAME=PAGE_TITLES><TMPL_VAR NAME=BC_NAME> | </TMPL_LOOP><MT_TRANS phrase="Movable Type Publishing Platform"></title>
--- tmpl/cms/header.tmpl.orig	Thu Apr 21 01:01:12 2005
+++ tmpl/cms/header.tmpl	Thu Apr 21 01:07:14 2005
@@ -1,6 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?xml version='1.0' encoding='iso-8859-1'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" > 
 
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=<TMPL_VAR NAME=LANGUAGE_ENCODING>" />
 <title><TMPL_LOOP NAME=PAGE_TITLES><TMPL_VAR NAME=BC_NAME ESCAPE=HTML> | </TMPL_LOOP><MT_TRANS phrase="Movable Type Publishing Platform"></title>
--- tmpl/cms/list_comment.tmpl.orig	Sat Apr 30 02:47:42 2005
+++ tmpl/cms/list_comment.tmpl	Sat Apr 30 02:48:18 2005
@@ -3,14 +3,12 @@
 <div id="list-comment">
 
 <script type="text/javascript">
-<!--
 function doBanIP (ip) {
   window.location = ("<TMPL_VAR NAME=SCRIPT_URL>"
     + "?__mode=save&amp;_type=banlist"
     + "&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>" 
     + "&amp;magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>&amp;ip=" + ip);
 }
-//-->
 </script>
 
 <h2><MT_TRANS phrase="List &amp; Edit Comments"></h2>
--- tmpl/cms/list_notification.tmpl.orig	Sat Apr 30 02:59:21 2005
+++ tmpl/cms/list_notification.tmpl	Sat Apr 30 03:03:42 2005
@@ -22,10 +22,10 @@
 
 <p>
 <label for="email"><MT_TRANS phrase="Email Address:"></label>
-<input name="email" id="email" value="<TMPL_VAR NAME=EMAIL>">
+<input name="email" id="email" value="<TMPL_VAR NAME=EMAIL>" />
 &nbsp;
 <label for="url"><MT_TRANS phrase="URL (Optional):"></label>
-<input name="url" id="url" value="<TMPL_VAR NAME=URL>">
+<input name="url" id="url" value="<TMPL_VAR NAME=URL>" />
 &nbsp;
 <input type="submit" value="<MT_TRANS phrase="Add">" />
 </p>
@@ -66,7 +66,7 @@
 </div>
 
 <div align="right">
-<input onclick="doRemoveItems(this.form, 'notification&blog_id=<TMPL_VAR NAME=BLOG_ID>', 'notification addresses')" type="button" value="<MT_TRANS phrase="Delete">" />
+<input onclick="doRemoveItems(this.form, 'notification&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'notification addresses')" type="button" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 </form>
--- tmpl/cms/list_commenters.tmpl.orig	Thu Apr 21 02:24:44 2005
+++ tmpl/cms/list_commenters.tmpl	Thu Apr 21 02:26:41 2005
@@ -60,10 +60,10 @@
 <input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_commenters&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;limit=' + this.form.limit.options[this.form.limit.selectedIndex].value + '&amp;offset=<TMPL_VAR NAME=PREV_OFFSET_VAL><TMPL_VAR NAME=FILTER_ARGS>'" value="<MT_TRANS phrase="Previous [_1]" params="<TMPL_VAR NAME=LIMIT>">" />
 </TMPL_IF>
 <select name="limit" onchange="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_commenters&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;limit=' + this.options[this.selectedIndex].value + '<TMPL_VAR NAME=FILTER_ARGS>'">
-<option value="5"<TMPL_IF NAME=LIMIT_5> selected</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="5"></option>
-<option value="20"<TMPL_IF NAME=LIMIT_20> selected</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="20"></option>
-<option value="75"<TMPL_IF NAME=LIMIT_75> selected</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="75"></option>
-<option value="125"<TMPL_IF NAME=LIMIT_125> selected</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="125"></option>
+<option value="5"<TMPL_IF NAME=LIMIT_5> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="5"></option>
+<option value="20"<TMPL_IF NAME=LIMIT_20> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="20"></option>
+<option value="75"<TMPL_IF NAME=LIMIT_75> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="75"></option>
+<option value="125"<TMPL_IF NAME=LIMIT_125> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,commenter,commenters]" params="125"></option>
 </select>
 <TMPL_IF NAME=NEXT_OFFSET>
 <input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_commenters&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;limit=' + this.form.limit.options[this.form.limit.selectedIndex].value + '&amp;offset=<TMPL_VAR NAME=NEXT_OFFSET_VAL><TMPL_VAR NAME=FILTER_ARGS>'" value="<MT_TRANS phrase="Next [_1]" params="<TMPL_VAR NAME=LIMIT>">" />
--- tmpl/cms/search_replace.tmpl.orig	Thu Apr 21 02:28:50 2005
+++ tmpl/cms/search_replace.tmpl	Thu Apr 21 02:30:50 2005
@@ -15,15 +15,15 @@
 <input name="do_search" type="submit" value="<MT_TRANS phrase="Search">" /></p>
 
 <p>
-<label><input type="checkbox" name="case" value="1"<TMPL_IF NAME=CASE> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Case Sensitive"></label> <a href="#" onclick="return openManual('search', 'item_case_sensitive')" class="help">?</a>&nbsp;&nbsp;
-<label><input type="checkbox" name="is_regex" value="1"<TMPL_IF NAME=IS_REGEX> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Regular Expression Match"></label> <a href="#" onclick="return openManual('search', 'item_regular_expression_match')" class="help">?</a>
+<label><input type="checkbox" name="case" value="1"<TMPL_IF NAME=CASE> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Case Sensitive"></label> <a href="#" onclick="return openManual('search', 'item_case_sensitive')" class="help">?</a>&nbsp;&nbsp;
+<label><input type="checkbox" name="is_regex" value="1"<TMPL_IF NAME=IS_REGEX> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Regular Expression Match"></label> <a href="#" onclick="return openManual('search', 'item_regular_expression_match')" class="help">?</a>
 </p>
 
 <p><strong><MT_TRANS phrase="Search fields:"></strong> <a href="#" onclick="return openManual('search', 'item_search_fields')" class="help">?</a><br />
-<label><input type="checkbox" name="search_cols" value="title"<TMPL_IF NAME=SEARCH_COLS_TITLE> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Title"></label>
-<label><input type="checkbox" name="search_cols" value="text"<TMPL_IF NAME=SEARCH_COLS_TEXT> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Entry Body"></label>
-<label><input type="checkbox" name="search_cols" value="text_more"<TMPL_IF NAME=SEARCH_COLS_TEXT_MORE> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Extended Entry"></label>
-<label><input type="checkbox" name="search_cols" value="keywords"<TMPL_IF NAME=SEARCH_COLS_KEYWORDS> checked="checked"</TMPL_IF>> <MT_TRANS phrase="Keywords"></label>
+<label><input type="checkbox" name="search_cols" value="title"<TMPL_IF NAME=SEARCH_COLS_TITLE> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Title"></label>
+<label><input type="checkbox" name="search_cols" value="text"<TMPL_IF NAME=SEARCH_COLS_TEXT> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Entry Body"></label>
+<label><input type="checkbox" name="search_cols" value="text_more"<TMPL_IF NAME=SEARCH_COLS_TEXT_MORE> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Extended Entry"></label>
+<label><input type="checkbox" name="search_cols" value="keywords"<TMPL_IF NAME=SEARCH_COLS_KEYWORDS> checked="checked"</TMPL_IF> /> <MT_TRANS phrase="Keywords"></label>
 </p>
 
 <h4><label for="replace"><MT_TRANS phrase="Replace with:"></label></h4>
--- tmpl/cms/edit_categories.tmpl.orig	Thu Apr 21 02:16:33 2005
+++ tmpl/cms/edit_categories.tmpl	Sat Apr 30 12:46:32 2005
@@ -3,7 +3,7 @@
 <div id="edit-categories">
 
 <script type="text/javascript">
-<!--
+<!--//--><![CDATA[//><!--
 // build array of each category's id and the header id
 var categoryRows = new Array('0'<TMPL_LOOP NAME="CATEGORY_LOOP">,'<TMPL_VAR NAME=CATEGORY_ID>'</TMPL_LOOP>);
 
@@ -21,7 +21,7 @@
             if (el.style.display != 'none') el.style.display = 'none';
         }
     }
-    document.forms['cat_form'].move_cat_id.value = '0';
+    getByID('cat_form').move_cat_id.value = '0';
 
     getByID('category-new-parent-' + id).focus();
 
@@ -58,7 +58,7 @@
         getByID('move-0').style.display = 'table-row';
 	}
 	getByID('action-col-head').style.display = 'none'; // hide header of actions column
-	document.forms['cat_form'].move_cat_id.value = id;
+	getByID('cat_form').move_cat_id.value = id;
     for (var i = 0; i < categoryRows.length; i++) {
 		if (document.all) {
 			getByID('move-col-' + categoryRows[i]).style.display = 'block'; // show radio buttons for category rows
@@ -68,7 +68,7 @@
         getByID('action-' + categoryRows[i]).style.display = 'none'; // hide actions column for category rows
     }
 }
-//-->
+//--><!]]>
 </script>
 
 <h2><MT_TRANS phrase="Categories"></h2>
@@ -83,7 +83,7 @@
 <div class="message"><MT_TRANS phrase="You have successfully deleted the selected categories."> <TMPL_INCLUDE NAME="rebuild-stub.tmpl"></div>
 </TMPL_IF>
 
-<form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" name="cat_form">
+<form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" name="cat_form" id="cat_form">
 <input type="hidden" name="blog_id" value="<TMPL_VAR NAME=BLOG_ID>" />
 <input type="hidden" name="__mode" value="save_cat" />
 <input type="hidden" name="move_cat_id" value="" />
@@ -146,7 +146,7 @@
 </tr>
 <tr class="create-row" id="create-<TMPL_VAR NAME=CATEGORY_ID>">
 <td class="move-col">&nbsp;</td>
-<td colspan="5" style="padding-left: 15px;"><span style="margin-left: <TMPL_VAR NAME=CATEGORY_PIXEL_DEPTH>px;"><input type="text" name="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" id="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" value="" maxlength="100" /> <input type="submit" name="save" value="<MT_TRANS phrase="Create Subcategory">" /> <input type="submit" name="cancel" value="<MT_TRANS phrase="Cancel">" onclick="cancelCreateMode(<TMPL_VAR NAME=CATEGORY_ID>); return false" /></td>
+<td colspan="5" style="padding-left: 15px;"><span style="margin-left: <TMPL_VAR NAME=CATEGORY_PIXEL_DEPTH>px;"><input type="text" name="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" id="category-new-parent-<TMPL_VAR NAME=CATEGORY_ID>" value="" maxlength="100" /> <input type="submit" name="save" value="<MT_TRANS phrase="Create Subcategory">" /> <input type="submit" name="cancel" value="<MT_TRANS phrase="Cancel">" onclick="cancelCreateMode(<TMPL_VAR NAME=CATEGORY_ID>); return false" /></span></td>
 </tr>
 </TMPL_LOOP>
 
--- tmpl/cms/reload_opener.tmpl.orig	Sat Apr 30 04:15:01 2005
+++ tmpl/cms/reload_opener.tmpl	Sat Apr 30 13:04:28 2005
@@ -1,12 +1,14 @@
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <script language="javascript">
+<!--//--><![CDATA[//><!--
 var o = window.opener;
 if (o && o.location) {
     <TMPL_IF NAME=URL>o.location = '<TMPL_VAR NAME=URL>';</TMPL_IF>
 <TMPL_VAR NAME=JAVASCRIPT>
     window.close();
 }
+//--><!]]>
 </script>
 </head>
 </html>
--- tmpl/cms/rebuild_confirm.tmpl.orig	Sat Apr 30 13:37:32 2005
+++ tmpl/cms/rebuild_confirm.tmpl	Sat Apr 30 13:37:50 2005
@@ -27,7 +27,7 @@
 </p>
 
 <div>
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Cancel">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Cancel">" />
 <input type="submit" value="<MT_TRANS phrase="Rebuild">" />
 </div>
 
--- tmpl/cms/list_template.tmpl.orig	Wed Apr  6 09:20:53 2005
+++ tmpl/cms/list_template.tmpl	Sat Apr 30 13:39:46 2005
@@ -3,28 +3,27 @@
 <div id="list-template">
 
 <script type="text/javascript">
-<!--
-
+<!--//--><![CDATA[//><!--
 function doEditTemplate (type, id) {
-    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&_type=template&blog_id=<TMPL_VAR NAME=BLOG_ID>';
+    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&amp;_type=template&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>';
     if (id)
-        url += '&id=' + id;
+        url += '&amp;id=' + id;
     else if (type)
-        url += '&type=' + type;
+        url += '&amp;type=' + type;
     window.location = url;
 }
 
 function doRemoveTemplates (f) {
-    var base = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=delete_confirm&_type=template&blog_id=<TMPL_VAR NAME=BLOG_ID>';
+    var base = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=delete_confirm&amp;_type=template&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>';
     var url = '';
     var e = f.id;
     if (!e) return;
     if (e.value && e.checked)
-        url += '&id=' + e.value;
+        url += '&amp;id=' + e.value;
     else
         for (i=0; i<e.length; i++)
             if (e[i].checked)
-                url += '&id=' + e[i].value;
+                url += '&amp;id=' + e[i].value;
     if (!url) {
         alert("<MT_TRANS phrase="You did not select any templates to delete." escape="singlequotes">");
         return false;
@@ -32,8 +31,7 @@
     url = base + url;
     window.open(url, 'confirm_delete', 'width=370,height=190');
 }
-
-//-->
+//--><!]]>
 </script>
 
 <h2><MT_TRANS phrase="Templates"></h2>
@@ -63,7 +61,7 @@
 
 <div class="rightcol">
 <TMPL_IF NAME=SHOW_BUILD_OPTIONS>
-<form method=GET action="<TMPL_VAR NAME=SCRIPT_URL>">
+<form method="GET" action="<TMPL_VAR NAME=SCRIPT_URL>">
 <input type="hidden" name="__mode" value="set_dynamicity" />
 <input type="hidden" name="_type" value="template" />
 <input type="hidden" name="blog_id" value="<TMPL_VAR NAME=BLOG_ID>" />
@@ -75,7 +73,7 @@
 <input type="radio" id="dynamic_archives" name="dynamicity" value="archives"<TMPL_IF NAME=DYNAMIC_ARCHIVES> checked="checked"</TMPL_IF> /> <label for="dynamic_archives"><MT_TRANS phrase="Build Only Archive Templates Dynamically"></label><br />
 <input type="radio" id="dynamic_custom" name="dynamicity" value="custom"<TMPL_IF NAME=DYNAMIC_CUSTOM> checked="checked"</TMPL_IF> /> <label for="dynamic_custom"><MT_TRANS phrase="Set Each Template's Build Options Separately"></label>
 </p>
-<input type="submit" value="<MT_TRANS phrase="Save">">
+<input type="submit" value="<MT_TRANS phrase="Save">" />
 </div>
 </form>
 </TMPL_IF>
@@ -96,15 +94,15 @@
 <tr>
 <th width="40%"><MT_TRANS phrase="Template Name"></th>
 <th width="30%"><MT_TRANS phrase="Output File"></th>
-<th width="20%"><MT_TRANS phrase="Build w/Indexes"></th>
+<th width="20%"><MT_TRANS phrase="Rebuild Type"></th>
 <th width="10%"><MT_TRANS phrase="Delete"></th>
 </tr>
 
 <TMPL_LOOP NAME=OBJECT_INDEX_LOOP>
 <tr class="<TMPL_IF NAME=IS_ODD>odd<TMPL_ELSE>even</TMPL_IF>">
-<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&_type=template&id=<TMPL_VAR NAME=ID>&blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=NAME></a></td>
+<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&amp;_type=template&amp;id=<TMPL_VAR NAME=ID>&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=NAME></a></td>
 <td><TMPL_VAR NAME=OUTFILE></td>
-<td><TMPL_IF NAME=REBUILD_ME><MT_TRANS phrase="Yes"><TMPL_ELSE><MT_TRANS phrase="No"></TMPL_IF></td>
+<td><TMPL_IF NAME=REBUILD_TYPE_NE><MT_TRANS phrase="Never"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_ALL><MT_TRANS phrase="All"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_EN><MT_TRANS phrase="Entry"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_CO><MT_TRANS phrase="Comment"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_TB><MT_TRANS phrase="Trackback"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_ENCO><MT_TRANS phrase="Entry, Comment *"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_ENTB><MT_TRANS phrase="Entry, Trackback"></TMPL_IF><TMPL_IF NAME=REBUILD_TYPE_COTB><MT_TRANS phrase="Comment, Trackback"></TMPL_IF></td>
 <td><input type="checkbox" name="id" value="<TMPL_VAR NAME=ID>" /></td>
 </tr>
 </TMPL_LOOP>
@@ -113,7 +111,7 @@
 </div>
 
 <div align="right">
-<input type="button" onClick="doRemoveTemplates(this.form)" name="Delete" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doRemoveTemplates(this.form)" name="Delete" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 </form>
@@ -143,11 +141,11 @@
 </div>
 
 <div align="right">
-<input type="button" onClick="doRemoveTemplates(this.form)" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doRemoveTemplates(this.form)" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 <div align="right">
-<a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=cfg_archives&blog_id=<TMPL_VAR NAME=BLOG_ID>"><MT_TRANS phrase="Edit Archive File Options"></a>
+<a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=cfg_archives&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>"><MT_TRANS phrase="Edit Archive File Options"></a>
 </div>
 
 </form>
@@ -209,7 +207,7 @@
 
 <TMPL_LOOP NAME=OBJECT_CUSTOM_LOOP>
 <tr class="<TMPL_IF NAME=IS_ODD>odd<TMPL_ELSE>even</TMPL_IF>">
-<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&_type=template&id=<TMPL_VAR NAME=ID>&blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=NAME></a></td>
+<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&amp;_type=template&amp;id=<TMPL_VAR NAME=ID>&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>"><TMPL_VAR NAME=NAME></a></td>
 <td><input type="checkbox" name="id" value="<TMPL_VAR NAME=ID>" /></td>
 </tr>
 </TMPL_LOOP>
@@ -218,7 +216,7 @@
 </div>
 
 <div align="right">
-<input type="button" onClick="doRemoveTemplates(this.form)" name="Delete" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doRemoveTemplates(this.form)" name="Delete" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 </form>
--- tmpl/cms/list_ping.tmpl.orig	Thu Apr 21 01:28:51 2005
+++ tmpl/cms/list_ping.tmpl	Sat Apr 30 13:44:04 2005
@@ -1,14 +1,12 @@
 <TMPL_INCLUDE NAME="header.tmpl">
 
 <script type="text/javascript">
-<!--
 function doBanIP (ip) {
   window.location = ("<TMPL_VAR NAME=SCRIPT_URL>"
     + "?__mode=save&amp;_type=banlist"
     + "&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>" 
     + "&amp;magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>&amp;ip=" + ip);
 }
-//-->
 </script>
 
 <h2><MT_TRANS phrase="TrackBack Pings"></h2>
@@ -27,9 +25,9 @@
 
 <div id="filters">
 <form action="<TMPL_VAR NAME=SCRIPT_URL>">
-<input type=hidden name="__mode" value="list_pings" />
-<input type=hidden name="blog_id" value="<TMPL_VAR NAME=BLOG_ID>" />
-<input type=hidden name="limit" value="<TMPL_VAR NAME=LIMIT>" />
+<input type="hidden" name="__mode" value="list_pings" />
+<input type="hidden" name="blog_id" value="<TMPL_VAR NAME=BLOG_ID>" />
+<input type="hidden" name="limit" value="<TMPL_VAR NAME=LIMIT>" />
 
 <MT_TRANS phrase="Show pings where">&nbsp;
 <select name="filter">
@@ -71,7 +69,7 @@
 <td><a href="<TMPL_VAR NAME=SOURCE_URL ESCAPE=HTML>" target="_blank"><TMPL_VAR NAME=TITLE ESCAPE=HTML></a></td>
 <td><TMPL_IF NAME=EXCERPT><TMPL_VAR NAME=EXCERPT ESCAPE=HTML><TMPL_ELSE>&nbsp;</TMPL_IF></td>
 <td><TMPL_VAR NAME=CREATED_ON_TIME_FORMATTED ESCAPE=HTML></td>
-<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;filter=blog_name&amp;filter_val=<TMPL_VAR NAME=BLOG_NAME ESCAPE=URL>"><img border=0 src="<TMPL_VAR NAME="STATIC_URI">images/filter.gif"><TMPL_VAR NAME=BLOG_NAME ESCAPE=HTML></a> (<a href="<TMPL_VAR NAME="SCRIPT_URL">?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME="BLOG_ID">&amp;filter=ip&amp;filter_val=<TMPL_VAR NAME=IP ESCAPE=URL>"><TMPL_VAR NAME=IP ESCAPE=HTML></a>)</td>
+<td><a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;filter=blog_name&amp;filter_val=<TMPL_VAR NAME=BLOG_NAME ESCAPE=URL>"><img border="0" src="<TMPL_VAR NAME="STATIC_URI">images/filter.gif" /><TMPL_VAR NAME=BLOG_NAME ESCAPE=HTML></a> (<a href="<TMPL_VAR NAME="SCRIPT_URL">?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME="BLOG_ID">&amp;filter=ip&amp;filter_val=<TMPL_VAR NAME=IP ESCAPE=URL>"><TMPL_VAR NAME=IP ESCAPE=HTML></a>)</td>
 <td><TMPL_IF NAME=HAS_EDIT_ACCESS><input type="checkbox" name="id" value="<TMPL_VAR NAME=ID>" /></TMPL_IF></td>
 </tr>
 </TMPL_LOOP>
@@ -81,11 +79,11 @@
 
 <div align="right">
 <TMPL_IF NAME=IS_IP_FILTER>
-<input type="button" onClick="doBanIP('<TMPL_VAR NAME=FILTER_VAL>')" value="<MT_TRANS phrase="Ban This IP">" />
+<input type="button" onclick="doBanIP('<TMPL_VAR NAME=FILTER_VAL>')" value="<MT_TRANS phrase="Ban This IP">" />
 </TMPL_IF>
-<input type="button" onClick="doCheckAll(this.form,true)" value="<MT_TRANS phrase="Check All">" />
-<input type="button" onClick="doCheckAll(this.form,false)" value="<MT_TRANS phrase="Uncheck All">" />
-<input type="button" onClick="doRemoveItems(this.form, 'ping&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'TrackBack pings')" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doCheckAll(this.form,true)" value="<MT_TRANS phrase="Check All">" />
+<input type="button" onclick="doCheckAll(this.form,false)" value="<MT_TRANS phrase="Uncheck All">" />
+<input type="button" onclick="doRemoveItems(this.form, 'ping&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>', 'TrackBack pings')" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 <hr />
@@ -94,7 +92,7 @@
 <TMPL_IF NAME=PREV_OFFSET>
 <input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;<TMPL_IF NAME=IS_POWER_EDIT>is_power_edit=1&amp;</TMPL_IF>limit=' + this.form.limit.options[this.form.limit.selectedIndex].value + '&amp;offset=<TMPL_VAR NAME=PREV_OFFSET_VAL><TMPL_VAR NAME=FILTER_ARGS>'" value="<MT_TRANS phrase="Previous [_1]" params="<TMPL_VAR NAME=LIMIT>">" />
 </TMPL_IF>
-<select name="limit" onChange="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;limit=' + this.options[this.selectedIndex].value + '<TMPL_VAR NAME=FILTER_ARGS>'">
+<select name="limit" onchange="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=list_pings&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;limit=' + this.options[this.selectedIndex].value + '<TMPL_VAR NAME=FILTER_ARGS>'">
 <option value="5"<TMPL_IF NAME=LIMIT_5> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,ping]" params="5"></option>
 <option value="20"<TMPL_IF NAME=LIMIT_20> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,ping]" params="20"></option>
 <option value="75"<TMPL_IF NAME=LIMIT_75> selected="selected"</TMPL_IF>><MT_TRANS phrase="[quant,_1,ping]" params="75"></option>
--- tmpl/cms/edit_template.tmpl.orig	Wed Mar 16 20:30:51 2005
+++ tmpl/cms/edit_template.tmpl	Sat Apr 30 13:46:07 2005
@@ -3,10 +3,9 @@
 <div id="edit-template">
 
 <script type="text/javascript">
-<!--
 
 function doRebuildOne (id) {
-    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=rebuild_confirm&blog_id=<TMPL_VAR NAME=BLOG_ID>&tmpl_id=' + id, 'rebuild', 'width=400,height=250,resizable=yes');
+    window.open('<TMPL_VAR NAME=SCRIPT_URL>?__mode=rebuild_confirm&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;tmpl_id=' + id, 'rebuild', 'width=400,height=250,resizable=yes');
 }
 
 function toggleAutoRebuild (t) {
@@ -20,7 +19,6 @@
 	}
 }
 
-//-->
 </script>
 
 <TMPL_IF NAME=ERROR>
@@ -35,7 +33,7 @@
 <TMPL_UNLESS NAME=BUILD_DYNAMIC>
 <TMPL_IF NAME=HAS_REBUILD>
 <form class="inline" action="<TMPL_VAR NAME=SCRIPT_URL>" onsubmit="return false;">
-<input type="button" onClick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_rebuild&blog_id=<TMPL_VAR NAME=BLOG_ID>&next=0&type=index-<TMPL_VAR NAME=ID>&tmpl_id=<TMPL_VAR NAME=ID>&single_template=1'" value="<MT_TRANS phrase="Rebuild this template">" />
+<input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_rebuild&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;next=0&amp;type=index-<TMPL_VAR NAME=ID>&amp;tmpl_id=<TMPL_VAR NAME=ID>&amp;single_template=1'" value="<MT_TRANS phrase="Rebuild this template">" />
 </form>
 </TMPL_IF>
 </TMPL_UNLESS>
@@ -117,6 +115,17 @@
 <div class="build-item">
 <div class="build-field"><input type="checkbox" id="rebuild_me" name="rebuild_me" value="1" <TMPL_IF NAME=REBUILD_ME>checked="checked" </TMPL_IF>/></div>
 <p><label for="rebuild_me"><MT_TRANS phrase="Rebuild this template automatically when rebuilding index templates"></label> <a href="#" onclick="return openManual('templates', 'item_rebuild_this_template_automatically')" class="help">?</a></p>
+<p><label><MT_TRANS phrase="Rebuild Type"></label>
+<select name="rebuild_type">
+ <option value="Ne" <TMPL_IF NAME=REBUILD_TYPE_NE>selected="selected"</TMPL_IF>><MT_TRANS phrase="Never"></option>
+ <option value="En" <TMPL_IF NAME=REBUILD_TYPE_EN>selected="selected"</TMPL_IF>><MT_TRANS phrase="Entry"></option>
+ <option value="Co" <TMPL_IF NAME=REBUILD_TYPE_CO>selected="selected"</TMPL_IF>><MT_TRANS phrase="Comment"></option>
+ <option value="Tb" <TMPL_IF NAME=REBUILD_TYPE_TB>selected="selected"</TMPL_IF>><MT_TRANS phrase="Trackback"></option>
+ <option value="EnCo" <TMPL_IF NAME=REBUILD_TYPE_ENCO>selected="selected"</TMPL_IF>><MT_TRANS phrase="Entry, Comment *"></option>
+ <option value="EnTb" <TMPL_IF NAME=REBUILD_TYPE_ENTB>selected="selected"</TMPL_IF>><MT_TRANS phrase="Entry, Trackback"></option>
+ <option value="CoTb" <TMPL_IF NAME=REBUILD_TYPE_COTB>selected="selected"</TMPL_IF>><MT_TRANS phrase="Comment, Trackback"></option>
+ <option value="All" <TMPL_IF NAME=REBUILD_TYPE_ALL>selected="selected"</TMPL_IF>><MT_TRANS phrase="All"></option>
+ </select></p>
 </div>
 </TMPL_IF>
 </div>
--- tmpl/cms/edit_comment.tmpl.orig	Sat Apr 30 03:33:03 2005
+++ tmpl/cms/edit_comment.tmpl	Sat Apr 30 13:48:11 2005
@@ -111,7 +111,7 @@
 <p>
 <TMPL_IF NAME=INVISIBLE_UNREGISTERED>
 <MT_TRANS phrase="This comment was posted without registration. It is awaiting your approval."> <br />
-<input type="button" onClick="window.location='<TMPL_VAR NAME="SCRIPT_URL">?__mode=approve_comment&blog_id=<TMPL_VAR NAME="BLOG_ID">&id=<TMPL_VAR NAME="ID">&magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>'" value="<MT_TRANS phrase="Approve">">
+<input type="button" onclick="window.location='<TMPL_VAR NAME="SCRIPT_URL">?__mode=approve_comment&amp;blog_id=<TMPL_VAR NAME="BLOG_ID">&amp;id=<TMPL_VAR NAME="ID">&amp;magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>'" value="<MT_TRANS phrase="Approve">">
 </TMPL_IF>
 <input type="button" onclick="doRemoveItem('<TMPL_VAR NAME=ID>', 'comment&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>')" value="<MT_TRANS phrase="Delete">" />
 <input type="submit" value="<MT_TRANS phrase="Save">" />
--- tmpl/cms/edit_placements.tmpl.orig	Sat Apr 30 02:50:18 2005
+++ tmpl/cms/edit_placements.tmpl	Sat Apr 30 13:49:48 2005
@@ -1,8 +1,7 @@
 <TMPL_INCLUDE NAME="header-popup.tmpl">
 
 <script type="text/javascript">
-<!--
-
+<!--//--><![CDATA[//><!--
 function move (from, to) {
     var fbox = new Array();
     var tbox = new Array();
@@ -49,8 +48,7 @@
     for (i=0; i<s.length; i++)
         s.options[i].selected = 1;
 }
-
-//-->
+//--><!]]>
 </script>
 
 <form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" onsubmit="select_all(this.category_id)">
@@ -92,7 +90,7 @@
 </table>
 
 <p align="center">
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Close">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Close">" />
 <input type="submit" value="<MT_TRANS phrase="Save">" />
 </p>
 
--- tmpl/cms/cfg_prefs.tmpl.orig	Thu Apr 21 13:40:54 2005
+++ tmpl/cms/cfg_prefs.tmpl	Sat Apr 30 13:51:37 2005
@@ -3,7 +3,6 @@
 <div id="cfg-prefs">
 
 <script type="text/javascript">
-<!--
 
 function doRemoveLicense () {
     document.cfg_form.cc_license.value = '';
@@ -25,7 +24,6 @@
     if (!c.checked) e.style.display = 'none';
 }
 
-//-->
 </script>
 
 <div align="right">
@@ -292,7 +290,7 @@
 <div id="unreg_comment_prefs" class="sub-field"<TMPL_IF NAME=ALLOW_UNREG_COMMENTS> style="display: block;"</TMPL_IF>>
 
 <div class="field" style="margin-bottom: 5px;">
-<h4><input type="checkbox" value="1" name="non_anonymous_comments" id="non_anonymous_comments"<TMPL_IF NAME=NON_ANONYMOUS_COMMENTS> checked="checked"</TMPL_IF> /> <label for="non_anonymous_comments"><MT_TRANS phrase="Require Name and Email Address Information"></label> <a href="#" onClick="return openManual('weblog_config', 'item_Require_Name_and_Email_Address_Information')" class="help">?</a></h4>
+<h4><input type="checkbox" value="1" name="non_anonymous_comments" id="non_anonymous_comments"<TMPL_IF NAME=NON_ANONYMOUS_COMMENTS> checked="checked"</TMPL_IF> /> <label for="non_anonymous_comments"><MT_TRANS phrase="Require Name and Email Address Information"></label> <a href="#" onclick="return openManual('weblog_config', 'item_Require_Name_and_Email_Address_Information')" class="help">?</a></h4>
 <p><MT_TRANS phrase="Should visitors to your site be required to submit a name and email address in order to post comments?"></p>
 </div>
 
--- tmpl/cms/cfg_archives_add.tmpl.orig	Sat Apr 30 13:54:01 2005
+++ tmpl/cms/cfg_archives_add.tmpl	Sat Apr 30 13:54:29 2005
@@ -28,7 +28,7 @@
 </p>
 
 <div align="right">
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Cancel">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Cancel">" />
 <input type="submit" value="<MT_TRANS phrase="Add">" />
 </div>
 
--- tmpl/cms/category_add.tmpl.orig	Sat Apr 30 13:55:31 2005
+++ tmpl/cms/category_add.tmpl	Sat Apr 30 13:55:46 2005
@@ -27,7 +27,7 @@
 </p>
 
 <div>
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Cancel">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Cancel">" />
 <input type="submit" value="<MT_TRANS phrase="Add">" />
 </div>
 
--- tmpl/cms/bm_posted.tmpl.orig	Sat Apr 30 13:56:38 2005
+++ tmpl/cms/bm_posted.tmpl	Sat Apr 30 13:57:02 2005
@@ -6,7 +6,7 @@
 
 <div align="right">
 <form action="<TMPL_VAR NAME=SCRIPT_URL>" onsubmit="return false;">
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Close">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Close">" />
 </form>
 </div>
 
--- tmpl/cms/bm_entry.tmpl.orig	Thu Apr 21 10:54:10 2005
+++ tmpl/cms/bm_entry.tmpl	Sat Apr 30 13:58:07 2005
@@ -1,7 +1,7 @@
 <TMPL_INCLUDE NAME="header-popup.tmpl">
 
 <script type="text/javascript">
-<!--
+<!--//--><![CDATA[//><!--
 <TMPL_IF NAME=SHOW_CATEGORY>
 
 var c = new Array;
@@ -91,7 +91,7 @@
     return true;
 }
 
-//-->
+//--><!]]>
 </script>
 
 <form name="entry_form" method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" onsubmit="return validate(this)">
@@ -184,21 +184,8 @@
 <input type="hidden" name="convert_breaks" value="0" />
 </TMPL_IF>
 
+<div class="field-buttons"></div>
 <p>
-<script type="text/javascript">
-<!--
-if (canFormat) {
-    with (document) {
-        write('<div style="float: right;">');
-        write('<a title="<MT_TRANS phrase="Bold" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'strong\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/bold-button.gif" alt="<MT_TRANS phrase="Bold" escape="singlequotes">" width="24" height="18" border="0" /></a>');
-        write('<a title="<MT_TRANS phrase="Italic" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'em\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/italic-button.gif" alt="<MT_TRANS phrase="Italic" escape="singlequotes">" width="24" height="18" border="0" /></a>');
-        write('<a title="<MT_TRANS phrase="Underline" escape="singlequotes">" href="#" onclick="return formatStr(document.entry_form.text, \'u\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/underline-button.gif" alt="<MT_TRANS phrase="Underline" escape="singlequotes">" width="24" height="18" border="0" /></a>');
-        write('<a title="<MT_TRANS phrase="Insert Link" escape="singlequotes">" href="#" onclick="return insertLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/url-button.gif" alt="<MT_TRANS phrase="Insert Link" escape="singlequotes">" width="26" height="18" border="0" /></a>');
-        write('</div>');
-    }
-}
-// -->
-</script>
 <label for="text"><MT_TRANS phrase="Entry Body"></label><br />
 <textarea onkeypress="mtShortCuts(event)" name="text" id="text" style="width: 100%;" rows="<TMPL_IF NAME=SHOW_TEXT_MORE>6<TMPL_ELSE>14</TMPL_IF>"><TMPL_VAR NAME=TEXT ESCAPE=HTML></textarea>
 </p>
@@ -225,7 +212,7 @@
 </TMPL_IF>
 
 <div align="center">
-<input type="button" onClick="window.close()" value="<MT_TRANS phrase="Cancel">" />
+<input type="button" onclick="window.close()" value="<MT_TRANS phrase="Cancel">" />
 <input type="submit" value="<MT_TRANS phrase="Post">" />
 </div>
 
--- tmpl/cms/view_log.tmpl.orig	Sat Apr 30 22:59:57 2005
+++ tmpl/cms/view_log.tmpl	Sat Apr 30 23:01:43 2005
@@ -28,7 +28,7 @@
 </div>
 
 <div align="center">
-<form><input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=reset_log&magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>'" value="<MT_TRANS phrase="Reset Activity Log">">
+<form><input type="button" onclick="window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=reset_log&amp;magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>'" value="<MT_TRANS phrase="Reset Activity Log">" />
 </form>
 </div>
 
--- tmpl/cms/upload_complete.tmpl.orig	Thu Apr 21 02:59:30 2005
+++ tmpl/cms/upload_complete.tmpl	Sat Apr 30 23:07:04 2005
@@ -10,7 +10,7 @@
 }
 
 function doShowHTML (f, mode) {
-    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=show_upload_html&blog_id=<TMPL_VAR NAME=BLOG_ID>&url=<TMPL_VAR NAME=URL ESCAPE=URL>&site_path=<TMPL_VAR NAME=SITE_PATH>&fname=<TMPL_VAR NAME=FNAME ESCAPE=URL>&' + mode;
+    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=show_upload_html&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;url=<TMPL_VAR NAME=URL ESCAPE=URL>&amp;site_path=<TMPL_VAR NAME=SITE_PATH>&amp;fname=<TMPL_VAR NAME=FNAME ESCAPE=URL>&amp;' + mode;
 <TMPL_IF NAME=DO_THUMB>
     if (f.thumb.checked)
         url += '&amp;thumb=1&amp;' + calcGeometry(f);
@@ -19,7 +19,7 @@
 }
 
 function doStartEntry (f, mode) {
-    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_upload_entry&blog_id=<TMPL_VAR NAME=BLOG_ID>&url=<TMPL_VAR NAME=URL ESCAPE=URL>&site_path=<TMPL_VAR NAME=SITE_PATH>&amp;fname=<TMPL_VAR NAME=FNAME ESCAPE=URL>&amp;' + mode;
+    var url = '<TMPL_VAR NAME=SCRIPT_URL>?__mode=start_upload_entry&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;url=<TMPL_VAR NAME=URL ESCAPE=URL>&amp;site_path=<TMPL_VAR NAME=SITE_PATH>&amp;fname=<TMPL_VAR NAME=FNAME ESCAPE=URL>&amp;' + mode;
 <TMPL_IF NAME=DO_THUMB>
     if (f.thumb.checked)
         url += '&amp;thumb=1&amp;' + calcGeometry(f);
@@ -90,12 +90,12 @@
 
 </script>
 
-<P>
+<p>
 <form action="<TMPL_VAR NAME=SCRIPT_URL>" onsubmit="return false;">
 <TMPL_IF NAME=DO_THUMB>
 <input type="hidden" name="full_width" value="<TMPL_VAR NAME=WIDTH>" />
 <input type="hidden" name="full_height" value="<TMPL_VAR NAME=HEIGHt>" />
-</TMPL_IF>
+</TMPL_IF></p>
 
 <p><MT_TRANS phrase="Your file has been uploaded. Size: [quant,_1,byte]." params="<TMPL_VAR NAME=BYTES>"></p>
 
@@ -141,7 +141,7 @@
 <div>
 <TMPL_IF NAME=IS_IMAGE>
 <input type="button" onclick="doClick(this.form, 'popup=1&amp;width=<TMPL_VAR NAME=WIDTH>&amp;height=<TMPL_VAR NAME=HEIGHT>&amp;image_type=<TMPL_VAR NAME=IMAGE_TYPE>')" value="<MT_TRANS phrase="Popup Image">" />
-<input type="button" onclick="doClick(this.form, 'include=1&width=<TMPL_VAR NAME=WIDTH>&height=<TMPL_VAR NAME=HEIGHT>&image_type=<TMPL_VAR NAME=IMAGE_TYPE>')" value="<MT_TRANS phrase="Embedded Image">" />
+<input type="button" onclick="doClick(this.form, 'include=1&amp;width=<TMPL_VAR NAME=WIDTH>&amp;height=<TMPL_VAR NAME=HEIGHT>&amp;image_type=<TMPL_VAR NAME=IMAGE_TYPE>')" value="<MT_TRANS phrase="Embedded Image">" />
 <TMPL_ELSE>
 <input type="button" onclick="doClick(this.form, 'link=1')" value="<MT_TRANS phrase="Link">" />
 </TMPL_IF>
--- tmpl/cms/login.tmpl.orig	Wed May  4 10:09:13 2005
+++ tmpl/cms/login.tmpl	Wed May  4 10:09:44 2005
@@ -1,7 +1,6 @@
 <TMPL_IF NAME=IS_BOOKMARKLET>
 <TMPL_INCLUDE NAME="header-popup.tmpl">
-<TMPL_ELSE>
-<TMPL_INCLUDE NAME="header.tmpl">
+<TMPL_ELSE><TMPL_INCLUDE NAME="header.tmpl">
 </TMPL_IF>
 
 <form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>">
--- tmpl/cms/preview_entry.tmpl.orig	2005-05-05 07:35:27.000000000 -0500
+++ tmpl/cms/preview_entry.tmpl	2005-05-05 07:39:45.000000000 -0500
@@ -7,7 +7,7 @@
 <input type="hidden" name="__mode" value="save_entry" />
 <input type="hidden" name="magic_token" value="<TMPL_VAR NAME=MAGIC_TOKEN>" />
 <TMPL_LOOP NAME=ENTRY_LOOP>
-<input type="hidden" name="<TMPL_VAR NAME=DATA_NAME ESCAPE=HTML>" value="<TMPL_VAR NAME=DATA_VALUE ESCAPE=HTML>" />
+<textarea style="display:none" readonly="readonly" name="<TMPL_VAR NAME=DATA_NAME ESCAPE=HTML>"><TMPL_VAR NAME=DATA_VALUE ESCAPE=HTML></textarea>
 </TMPL_LOOP>
 
 <TMPL_VAR NAME=PREVIEW_BODY>
--- tmpl/cms/pinging.tmpl.orig	2005-04-21 23:31:32.000000000 -0500
+++ tmpl/cms/pinging.tmpl	2005-05-23 03:03:18.000000000 -0500
@@ -1,16 +1,13 @@
 <TMPL_IF NAME=IS_BM>
 <TMPL_INCLUDE NAME="header-popup.tmpl">
-<TMPL_ELSE>
-<TMPL_INCLUDE NAME="header.tmpl">
+<TMPL_ELSE><TMPL_INCLUDE NAME="header.tmpl">
 </TMPL_IF>
 
 <script type="text/javascript">
-<!--
 function doRedirect () {
-    window.location.replace('<TMPL_VAR NAME=SCRIPT_URL>?__mode=ping&blog_id=<TMPL_VAR NAME=BLOG_ID>&entry_id=<TMPL_VAR NAME=ENTRY_ID>&is_new=<TMPL_VAR NAME=IS_NEW>&old_status=<TMPL_VAR NAME=OLD_STATUS>&magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>&is_bm=<TMPL_VAR NAME=IS_BM>');
+    window.location.replace('<TMPL_VAR NAME=SCRIPT_URL>?__mode=ping&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;entry_id=<TMPL_VAR NAME=ENTRY_ID>&amp;is_new=<TMPL_VAR NAME=IS_NEW>&amp;old_status=<TMPL_VAR NAME=OLD_STATUS>&amp;magic_token=<TMPL_VAR NAME=MAGIC_TOKEN>&amp;is_bm=<TMPL_VAR NAME=IS_BM>');
 }
 setTimeout('doRedirect()', 1000);
-// -->
 </script>
 
 <TMPL_UNLESS NAME=IS_BM>
--- tmpl/cms/rebuilding.tmpl.orig	2005-04-21 23:35:22.000000000 -0500
+++ tmpl/cms/rebuilding.tmpl	2005-05-23 03:16:46.000000000 -0500
@@ -1,16 +1,12 @@
-<TMPL_IF NAME=IS_FULL_SCREEN>
-<TMPL_INCLUDE NAME="header.tmpl">
-<TMPL_ELSE>
-<TMPL_INCLUDE NAME="header-popup.tmpl">
+<TMPL_IF NAME=IS_FULL_SCREEN><TMPL_INCLUDE NAME="header.tmpl">
+<TMPL_ELSE><TMPL_INCLUDE NAME="header-popup.tmpl">
 </TMPL_IF>
 
 <script type="text/javascript">
-<!--
 function doRedirect () {
-    window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=rebuild&blog_id=<TMPL_VAR NAME=BLOG_ID>&type=<TMPL_VAR NAME=BUILD_TYPE>&next=<TMPL_VAR NAME=BUILD_NEXT>&offset=<TMPL_VAR NAME=OFFSET>&limit=<TMPL_VAR NAME=LIMIT>&total_entries=<TMPL_VAR NAME=TOTAL_ENTRIES>&is_bm=<TMPL_VAR NAME=IS_BM>&entry_id=<TMPL_VAR NAME=ENTRY_ID>&is_new=<TMPL_VAR NAME=IS_NEW>&old_status=<TMPL_VAR NAME=OLD_STATUS>&old_previous=<TMPL_VAR NAME=OLD_PREVIOUS>&old_next=<TMPL_VAR NAME=OLD_NEXT><TMPL_IF NAME=IS_FULL_SCREEN>&fs=1</TMPL_IF><TMPL_IF DYNAMIC>&dynamic=1</TMPL_IF>';
+    window.location='<TMPL_VAR NAME=SCRIPT_URL>?__mode=rebuild&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;type=<TMPL_VAR NAME=BUILD_TYPE>&amp;next=<TMPL_VAR NAME=BUILD_NEXT>&amp;offset=<TMPL_VAR NAME=OFFSET>&amp;limit=<TMPL_VAR NAME=LIMIT>&amp;total_entries=<TMPL_VAR NAME=TOTAL_ENTRIES>&amp;is_bm=<TMPL_VAR NAME=IS_BM>&amp;entry_id=<TMPL_VAR NAME=ENTRY_ID>&amp;is_new=<TMPL_VAR NAME=IS_NEW>&amp;old_status=<TMPL_VAR NAME=OLD_STATUS>&amp;old_previous=<TMPL_VAR NAME=OLD_PREVIOUS>&amp;old_next=<TMPL_VAR NAME=OLD_NEXT><TMPL_IF NAME=IS_FULL_SCREEN>&amp;fs=1</TMPL_IF><TMPL_IF DYNAMIC>&amp;dynamic=1</TMPL_IF>';
 }
 setTimeout('doRedirect()', 200);
-// -->
 </script>
 
 <TMPL_IF NAME=IS_FULL_SCREEN>
--- tmpl/cms/list_entry.tmpl.orig	2005-04-21 01:11:57.000000000 -0500
+++ tmpl/cms/list_entry.tmpl	2005-05-23 10:11:17.000000000 -0500
@@ -1,14 +1,11 @@
-<TMPL_IF NAME=IS_POWER_EDIT>
-<TMPL_INCLUDE NAME="header-popup.tmpl">
-<TMPL_ELSE>
-<TMPL_INCLUDE NAME="header.tmpl">
+<TMPL_IF NAME=IS_POWER_EDIT><TMPL_INCLUDE NAME="header-popup.tmpl">
+<TMPL_ELSE><TMPL_INCLUDE NAME="header.tmpl">
 </TMPL_IF>
 
 <h2><MT_TRANS phrase="List &amp; Edit Entries"></h2>
 
 <script type="text/javascript">
-<!--
-
+<!--//--><![CDATA[//><!--
 var va = new Array;
 va['status'] = new Array;
 va['status'][0] = new MTChoice('<MT_TRANS phrase="Draft">', 1);
@@ -39,8 +36,7 @@
         s.options[i+1] = new Option(m[i].label, m[i].id);
     s.length = m.length + 1;
 }
-
-//-->
+//--><!]]>
 </script>
 
 <p>
@@ -71,7 +67,7 @@
 </TMPL_IF>
 
 <MT_TRANS phrase="Show entries where">&nbsp;
-<select name="filter" onChange="setMenu(this.form)">
+<select name="filter" onchange="setMenu(this.form)">
 <option value=""><MT_TRANS phrase="Select"></option>
 <option value="category_id"><MT_TRANS phrase="Category"></option>
 <option value="author_id"><MT_TRANS phrase="Author"></option>
@@ -176,7 +172,7 @@
 <div align="right">
 <input type="button" onclick="doCheckAll(this.form,true)" name="check_all" value="<MT_TRANS phrase="Check All">" />
 <input type="button" onclick="doCheckAll(this.form,false)" name="uncheck_all" value="<MT_TRANS phrase="Uncheck All">" />
-<input type="button" onClick="doRemoveItems(this.form, 'entry&amp;blog_id=<TMPL_VAR NAME=BLOG_ID><TMPL_IF NAME=IS_POWER_EDIT>&amp;is_power_edit=1</TMPL_IF>', 'entries')" name="delete_entries" value="<MT_TRANS phrase="Delete">" />
+<input type="button" onclick="doRemoveItems(this.form, 'entry&amp;blog_id=<TMPL_VAR NAME=BLOG_ID><TMPL_IF NAME=IS_POWER_EDIT>&amp;is_power_edit=1</TMPL_IF>', 'entries')" name="delete_entries" value="<MT_TRANS phrase="Delete">" />
 </div>
 
 </form>
--- lib/MT/App/CMS.pm.orig	2005-04-13 19:12:37.000000000 -0500
+++ lib/MT/App/CMS.pm	2005-05-23 11:07:18.000000000 -0500
@@ -386,7 +386,7 @@
 
 sub _bm_js {
     my($uri, $show, $height) = @_;
-    qq!javascript:d=document;w=window;t='';if(d.selection)t=d.selection.createRange().text;else{if(d.getSelection)t=d.getSelection();else{if(w.getSelection)t=w.getSelection()}}void(w.open('$uri?is_bm=1&bm_show=$show&__mode=view&_type=entry&link_title='+escape(d.title)+'&link_href='+escape(d.location.href)+'&text='+escape(t),'_blank','scrollbars=yes,width=400,height=$height,status=yes,resizable=yes,scrollbars=yes'))!;
+    qq!javascript:d=document;w=window;t='';if(d.selection)t=d.selection.createRange().text;else{if(d.getSelection)t=d.getSelection();else{if(w.getSelection)t=w.getSelection()}}void(w.open('$uri?is_bm=1&amp;bm_show=$show&amp;__mode=view&amp;_type=entry&amp;link_title='+escape(d.title)+'&amp;link_href='+escape(d.location.href)+'&amp;text='+escape(t),'_blank','scrollbars=yes,width=400,height=$height,status=yes,resizable=yes,scrollbars=yes'))!;
 }
 
 sub view_log {
@@ -420,7 +420,7 @@
     $app->validate_magic() or return;
     require MT::Log;
     MT::Log->remove_all;
-    $app->redirect($app->uri . '?__mode=view_log&reset=1');
+    $app->redirect($app->uri . '?__mode=view_log&amp;reset=1');
 }
 
 sub start_import {
@@ -438,7 +438,7 @@
             @data;
     $param{category_loop} = \@data;
     my $blog = MT::Blog->load($blog_id);
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Import/Export'));
     $param{nav_import} = 1;
     $app->build_page('import.tmpl', \%param);
@@ -602,7 +602,7 @@
         if ($blog_id) {
             $blog = MT::Blog->load($blog_id);
             $app->add_breadcrumb($blog->name,
-                                 $app->uri.'?__mode=menu&blog_id='.$blog->id);
+                                 $app->uri.'?__mode=menu&amp;blog_id='.$blog->id);
         }
 
         if ($id) {          # object exists, we're just editing it.
@@ -627,7 +627,7 @@
             if ($type eq 'entry') {
                 $app->add_breadcrumb($app->translate('Entries'),
 				     $app->uri . 
-				     '?__mode=list_entries&blog_id=' . $blog_id);
+				     '?__mode=list_entries&amp;blog_id=' . $blog_id);
                 $app->add_breadcrumb($obj->title || $app->translate('(untitled)'));
                 ## Don't pass in author_id, because it will clash with the
                 ## author_id parameter of the author currently logged in.
@@ -699,7 +699,7 @@
                 $param{entry_permalink} = $obj->permalink;
             } elsif ($type eq 'category') {
                 $app->add_breadcrumb($app->translate('Categories'),
-                                     $app->uri . '?__mode=list_cat&blog_id=' . 
+                                     $app->uri . '?__mode=list_cat&amp;blog_id=' . 
                                      $obj->blog_id);
                 $app->add_breadcrumb($obj->label);
                 require MT::Trackback;
@@ -716,7 +716,7 @@
                 }
             } elsif ($type eq 'template') {
                 $app->add_breadcrumb($app->translate('Templates'),
-                            $app->uri . '?__mode=list&_type=template&blog_id=' . 
+                            $app->uri . '?__mode=list&amp;_type=template&amp;blog_id=' . 
                                      $obj->blog_id);
                 $app->add_breadcrumb($obj->name);
                 $blog_id = $obj->blog_id;
@@ -742,8 +742,8 @@
                     $obj->rebuild_me : 1;
             } elsif ($type eq 'blog') {
                 $app->add_breadcrumb($app->translate('Configuration'),
-                                     $app->uri . '?__mode=view&_type=blog&id=' .
-                                     $obj->id . '&blog_id=' . $obj->id);
+                                     $app->uri . '?__mode=view&amp;_type=blog&amp;id=' .
+                                     $obj->id . '&amp;blog_id=' . $obj->id);
                 if (($param{output}||"") eq 'cfg_prefs.tmpl') {
                     $app->add_breadcrumb($app->translate('Preferences'));
                 } else {
@@ -822,7 +828,7 @@
                 };
             } elsif ($type eq 'comment') {
                 $app->add_breadcrumb($app->translate('Comments'),
-                   $app->uri . '?__mode=list_comments&blog_id=' . $obj->blog_id);
+                   $app->uri . '?__mode=list_comments&amp;blog_id=' . $obj->blog_id);
                 $app->add_breadcrumb($app->translate('Edit Comment'));
                 require MT::Entry;
                 if (my $entry = MT::Entry->load($obj->entry_id)) {
@@ -866,7 +872,7 @@
             if ($type eq 'entry') {
                 if ($blog_id) {
                     $app->add_breadcrumb($app->translate('Entries'), 
-                         $app->uri . '?__mode=list_entries&blog_id=' . $blog_id);
+                         $app->uri . '?__mode=list_entries&amp;blog_id=' . $blog_id);
                     $app->add_breadcrumb($app->translate('New Entry'));
                     $param{nav_new_entry} = 1;
                 }
@@ -945,7 +951,7 @@
                     $param{blog_loop} = \@data;
                 }
             } elsif ($type eq 'template') {
-                $app->add_breadcrumb($app->translate('Templates'), $app->uri . '?__mode=list&_type=template&blog_id=' . $blog->id);
+                $app->add_breadcrumb($app->translate('Templates'), $app->uri . '?__mode=list&amp;_type=template&amp;blog_id=' . $blog->id);
                 $app->add_breadcrumb($app->translate('New Template'));
                 my $template_type = $q->param('type')
                        || return $app->errtrans("Create template requires type");
@@ -1541,37 +1553,37 @@
         }
         if ($type eq 'author' && !$id) {
 	    return $app->redirect($app->uri .
-				  '?__mode=edit_permissions&author_id=' .
+				  '?__mode=edit_permissions&amp;author_id=' .
 				  $obj->id);
         } elsif ($type eq 'notification') {
             return $app->redirect($app->uri .
-                '?__mode=list&_type=notification&blog_id=' . $blog_id .
-                '&saved=' . $obj->email);
+                '?__mode=list&amp;_type=notification&amp;blog_id=' . $blog_id .
+                '&amp;saved=' . $obj->email);
         } elsif ($type eq 'comment') {
 	    if ($q->param('_return') eq 'edit_entry') {
 		return $app->redirect($app->uri .
-		   '?__mode=view&_type=entry&id=' . $obj->entry_id .
-		   '&blog_id=' . $blog_id . '&saved_comment=1');
+		   '?__mode=view&amp;_type=entry&amp;id=' . $obj->entry_id .
+		   '&amp;blog_id=' . $blog_id . '&amp;saved_comment=1');
 	    } elsif ($q->param('_return') eq 'list_comments') {
 		return $app->redirect($app->uri .
-		   '?__mode=list_comments&id=' . $obj->entry_id .
-		   '&blog_id=' . $blog_id . '&saved_comment=1');
+		   '?__mode=list_comments&amp;id=' . $obj->entry_id .
+		   '&amp;blog_id=' . $blog_id . '&amp;saved_comment=1');
 	    } elsif ($q->param('_return') eq 'edit_comment') {
 		return $app->redirect($app->uri .
-		   '?__mode=view&_type=comment&id=' . $obj->id .
-		   '&blog_id=' . $blog_id . '&saved_comment=1');
+		   '?__mode=view&amp;_type=comment&amp;id=' . $obj->id .
+		   '&amp;blog_id=' . $blog_id . '&amp;saved_comment=1');
 	    }
         } elsif (my $cfg_screen = $q->param('cfg_screen')) {
             return $app->redirect($app->uri .
-                "?__mode=$cfg_screen&blog_id=" . $obj->id . '&saved=1');
+                "?__mode=$cfg_screen&amp;blog_id=" . $obj->id . '&amp;saved=1');
         } elsif ($type eq 'banlist') {
             return $app->redirect($app->uri .
-                '?__mode=list&_type=banlist&blog_id=' . $blog_id .
-                '&saved=' . $obj->ip);
+                '?__mode=list&amp;_type=banlist&amp;blog_id=' . $blog_id .
+                '&amp;saved=' . $obj->ip);
         } else {
             return $app->redirect($app->uri .
-                '?__mode=view&_type=' . $type . '&id=' . $obj->id .
-                '&blog_id=' . $blog_id . '&saved=1');
+                '?__mode=view&amp;_type=' . $type . '&amp;id=' . $obj->id .
+                '&amp;blog_id=' . $blog_id . '&amp;saved=1');
         }
     }
 
@@ -1655,7 +1667,7 @@
         if ($type eq 'notification') {
             my $blog = MT::Blog->load(scalar $q->param('blog_id'));
             $app->add_breadcrumb($blog->name, $app->uri .
-                                 '?__mode=menu&blog_id=' . $blog->id);
+                                 '?__mode=menu&amp;blog_id=' . $blog->id);
             $app->add_breadcrumb($app->translate('Notification List'));
             $param{nav_notifications} = 1;
             @data = sort { $a->{email} cmp $b->{email} } @data;
@@ -1666,7 +1678,7 @@
         if ($type eq 'template') {
             my $blog = MT::Blog->load(scalar $q->param('blog_id'));
             $app->add_breadcrumb($blog->name, $app->uri
-                                 . '?__mode=menu&blog_id=' . $blog->id);
+                                 . '?__mode=menu&amp;blog_id=' . $blog->id);
             $app->add_breadcrumb($app->translate('Templates'));
             $param{dynamic_none} = $blog->custom_dynamic_templates eq 'none';
             $param{dynamic_archives} = 
@@ -1689,16 +1707,16 @@
         if ($type eq 'banlist') {
             my $blog = MT::Blog->load($blog_id);
             $app->add_breadcrumb($blog->name,
-                                 $app->uri . '?__mode=menu&blog_id=' .$blog->id);
+                                 $app->uri . '?__mode=menu&amp;blog_id=' .$blog->id);
             $app->add_breadcrumb($app->translate('Configuration'), 
-                                 $app->uri . '?__mode=view&_type=blog&id=' .
-                                 $blog->id . '&blog_id=' . $blog->id);
+                                 $app->uri . '?__mode=view&amp;_type=blog&amp;id=' .
+                                 $blog->id . '&amp;blog_id=' . $blog->id);
             $app->add_breadcrumb($app->translate('IP Banning'));
             $param{nav_config} = 1;
         } elsif ($type eq 'ping') {
             my $blog = MT::Blog->load($blog_id);
             $app->add_breadcrumb($blog->name, $app->uri . 
-                                 '?__mode=menu&blog_id=' . $blog->id);
+                                 '?__mode=menu&amp;blog_id=' . $blog->id);
             $app->add_breadcrumb($app->translate('TrackBack Pings'));
             $param{nav_trackbacks} = 1;
         }
@@ -1845,21 +1863,21 @@
 	my $_return = $q->param('_return') || "";
 	my %types = (
             comment => ($_return eq 'edit_entry'
-			? "__mode=view&_type=entry" : "__mode=list_comments")
-		     . "&blog_id=$blog_id&id=$entry_id&",
+			? "__mode=view&amp;_type=entry" : "__mode=list_comments")
+		     . "&amp;blog_id=$blog_id&amp;id=$entry_id&amp;",
             ping => ($_return eq 'edit_entry'
-		     ? "__mode=view&_type=entry&id=$entry_id&"
-                     : "__mode=list_pings&")
-		     . "blog_id=$blog_id&",
-            ping_cat => "__mode=tb_cat_pings&blog_id=$blog_id&category_id=$cat_id&",
-            entry => "__mode=list_entries&blog_id=$blog_id&",
-            notification => "__mode=list&_type=notification&blog_id=$blog_id&",
-            template => "__mode=list&_type=template&blog_id=$blog_id&",
+		     ? "__mode=view&amp;_type=entry&amp;id=$entry_id&amp;"
+                     : "__mode=list_pings&amp;")
+		     . "blog_id=$blog_id&amp;",
+            ping_cat => "__mode=tb_cat_pings&amp;blog_id=$blog_id&amp;category_id=$cat_id&amp;",
+            entry => "__mode=list_entries&amp;blog_id=$blog_id&amp;",
+            notification => "__mode=list&amp;_type=notification&amp;blog_id=$blog_id&amp;",
+            template => "__mode=list&amp;_type=template&amp;blog_id=$blog_id&amp;",
             blog => "",
-            author => "__mode=list&_type=author&",
-            category => "__mode=list_cat&blog_id=$blog_id&",
-            templatemap => "__mode=cfg_archives&id=$blog_id&blog_id=$blog_id&",
-            banlist => "__mode=list&_type=banlist&blog_id=$blog_id&",
+            author => "__mode=list&amp;_type=author&amp;",
+            category => "__mode=list_cat&amp;blog_id=$blog_id&amp;",
+            templatemap => "__mode=cfg_archives&amp;id=$blog_id&amp;blog_id=$blog_id&amp;",
+            banlist => "__mode=list&amp;_type=banlist&amp;blog_id=$blog_id&amp;",
         );
         my $url = $app->uri . '?' . $types{$type} .
             ($type eq 'ping' ? 'saved_deleted_ping=1' : 'saved_deleted=1');
@@ -2050,22 +2068,22 @@
 
     }
     if ($q->param('_return') eq 'list_commenters') {
-	return $app->redirect($app->uri."?__mode=list_commenters&blog_id=" .
-			      $blog_id . ($msg?'&msg='. $msg:""));
+	return $app->redirect($app->uri."?__mode=list_commenters&amp;blog_id=" .
+			      $blog_id . ($msg?'&amp;msg='. $msg:""));
     } elsif ($q->param('_return') eq 'list_comments') {
-	return $app->redirect($app->uri."?__mode=list_comments&blog_id=" .
-			      $blog_id . ($msg?'&msg='. $msg:""));
+	return $app->redirect($app->uri."?__mode=list_comments&amp;blog_id=" .
+			      $blog_id . ($msg?'&amp;msg='. $msg:""));
     } else {
 	if ($old_status == PENDING && $cmntr->status($blog_id) == BLOCKED) {
 	    # In this case, we've removed the comment, so we go to the
 	    # comment list instead of to the individual comment.
-	    return $app->redirect($app->uri."?__mode=list_comments&blog_id=" .
-				  $blog_id . ($msg?'&msg='. $msg:""));
+	    return $app->redirect($app->uri."?__mode=list_comments&amp;blog_id=" .
+				  $blog_id . ($msg?'&amp;msg='. $msg:""));
 	}
-	return $app->redirect($app->uri."?__mode=view&_type=comment&blog_id=" .
+	return $app->redirect($app->uri."?__mode=view&amp;_type=comment&amp;blog_id=" .
 			      $blog_id .
-			      "&id=" . $q->param('comment_id') .
-			      ($msg?'&msg='. $msg : ""));
+			      "&amp;id=" . $q->param('comment_id') .
+			      ($msg?'&amp;msg='. $msg : ""));
     }
 }
 
@@ -2093,12 +2111,12 @@
         $app->rebuild_entry(Entry => $comment->entry_id, BuildDependencies => 1)
     });
     if ($q->param('_return') eq 'list_comments') {
-        return $app->redirect($app->uri . "?__mode=list_comments&blog_id=" . 
-                              $blog_id . "&approved=1");
+        return $app->redirect($app->uri . "?__mode=list_comments&amp;blog_id=" . 
+                              $blog_id . "&amp;approved=1");
     } else {
-        return $app->redirect($app->uri . "?__mode=view&_type=comment&blog_id=" .
-                              $blog_id . "&id=" . $comment_id .
-                              "&approved=1");
+        return $app->redirect($app->uri . "?__mode=view&amp;_type=comment&amp;blog_id=" .
+                              $blog_id . "&amp;id=" . $comment_id .
+                              "&amp;approved=1");
     }
 }
 
@@ -2148,7 +2166,7 @@
 	    $param{filter} = $filter_col;
 	    $param{filter_val} = $val;
 	    my $url_val = encode_url($val);
-	    $param{filter_args} = "&filter=$filter_col&filter_val=$url_val";
+	    $param{filter_args} = "&amp;filter=$filter_col&amp;filter_val=$url_val";
 	}
     }
     my $iter1 = MT::Author->load_iter(\%terms); #, \%arg);
@@ -2209,7 +2227,7 @@
                                     if ref $MT::PluginActions{'list_commenters'};
 
     my $blog = MT::Blog->load(scalar $q->param('blog_id'));
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Registered Commenters'));
     $param{nav_commenters} = 1;
     return $app->build_page('list_commenters.tmpl', \%param);
@@ -2266,7 +2284,7 @@
 	    my $url_val = encode_url($val);
 	    $param{filter} = $q->param('filter');
 	    $param{filter_val} = $q->param('filter_val');;
-	    $param{filter_args} = "&filter=$filter_col&filter_val=$url_val";
+	    $param{filter_args} = "&amp;filter=$filter_col&amp;filter_val=$url_val";
 	    $param{is_filtered} = 1;
 	}
     }
@@ -2346,7 +2364,7 @@
     $param{plugin_action_loop} = $MT::PluginActions{'list_comments'}
                       if ref $MT::PluginActions{'list_comments'};
     $app->add_breadcrumb($blog->name,
-                         $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+                         $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Comments'));
     $param{nav_comments} = 1;
     $app->build_page("list_comment.tmpl", \%param);
@@ -2394,7 +2412,7 @@
             }
             (my $url_val = $val) =~
                 s!([^a-zA-Z0-9_.-])!uc sprintf "%%%02x", ord($1)!eg;
-            $param{filter_args} = "&filter=$filter_col&filter_val=$url_val";
+            $param{filter_args} = "&amp;filter=$filter_col&amp;filter_val=$url_val";
             $param{filter} = $filter_col;
 	    $param{filter_val} = $val;
 	    $param{is_filtered} = 1;
@@ -2459,7 +2477,7 @@
     $param{saved} = $q->param('saved');
     $param{saved_deleted} = $q->param('saved_deleted');
     $param{plugin_action_loop} = $MT::PluginActions{'list_ping'} || [];
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('TrackBack Pings'));
     $param{nav_trackbacks} = 1;
     $app->build_page("list_ping.tmpl", \%param);
@@ -2512,7 +2530,7 @@
 	    }
 	    (my $url_val = $val) =~
 		s!([^a-zA-Z0-9_.-])!uc sprintf "%%%02x", ord($1)!eg;
-	    $param{filter_args} = "&filter=$filter_col&filter_val=$url_val";
+	    $param{filter_args} = "&amp;filter=$filter_col&amp;filter_val=$url_val";
 
             my ($filter_name, $filter_value);
             if ($filter_col eq 'category_id') {
@@ -2654,7 +2672,7 @@
     $param{limit} = $limit;
     $param{offset} = $offset;
     my $blog = MT::Blog->load($blog_id);
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Entries'));
     $param{nav_entries} = 1;
     $app->build_page("list_entry.tmpl", \%param);
@@ -2720,15 +2738,15 @@
                     "Saving placement failed: [_1]", $place->errstr));
         }
     }
-    my $url = $app->uri . '?__mode=list_entries&blog_id=' . $blog_id .
-              '&is_power_edit=1' . $q->param('filter_args');
+    my $url = $app->uri . '?__mode=list_entries&amp;blog_id=' . $blog_id .
+              '&amp;is_power_edit=1' . $q->param('filter_args');
     if (my $o = $q->param('offset')) {
-        $url .= '&offset=' . $o;
+        $url .= '&amp;offset=' . $o;
     }
     if (my $l = $q->param('limit')) {
-        $url .= '&limit=' . $l;
+        $url .= '&amp;limit=' . $l;
     }
-    $app->redirect($url . '&saved=1');
+    $app->redirect($url . '&amp;saved=1');
 }
 
 sub save_entry {
@@ -2740,7 +2758,7 @@
         $q->param('_type', 'entry');
         return $app->edit_object;
     } elsif ($q->param('cancel')) {
-        return $app->redirect($app->uri . '?__mode=list_entries&blog_id=' .
+        return $app->redirect($app->uri . '?__mode=list_entries&amp;blog_id=' .
                               $app->param('blog_id'));
     }
     my $perms = $app->{perms}
@@ -2856,12 +2874,12 @@
                                            IsNew => $is_new,
                                            IsBM => $q->param('is_bm')||0);
         } else {
-            return $app->redirect($app->uri.'?__mode=start_rebuild&blog_id='.
-                      $obj->blog_id . '&next=0&type=entry-' . $obj->id .
-                      '&entry_id=' . $obj->id . '&is_bm=' . $q->param('is_bm') .
-                      '&is_new=' . $is_new . '&old_status=' . $status_old .
-                      ($previous_old ? '&old_previous=' . $previous_old->id:'').
-                      ($next_old ? '&old_next=' . $next_old->id : ''));
+            return $app->redirect($app->uri.'?__mode=start_rebuild&amp;blog_id='.
+                      $obj->blog_id . '&amp;next=0&amp;type=entry-' . $obj->id .
+                      '&amp;entry_id=' . $obj->id . '&amp;is_bm=' . $q->param('is_bm') .
+                      '&amp;is_new=' . $is_new . '&amp;old_status=' . $status_old .
+                      ($previous_old ? '&amp;old_previous=' . $previous_old->id:'').
+                      ($next_old ? '&amp;old_next=' . $next_old->id : ''));
         }
     }
     $app->_finish_rebuild_ping($obj, !$id);
@@ -2899,10 +2917,10 @@
                           $entry->status == MT::Entry::RELEASE() );
         $app->build_page("bm_posted.tmpl", \%param);
     } else {
-        $app->redirect($app->uri . '?__mode=view&_type=entry&blog_id=' .
-                       $entry->blog_id . '&id=' . $entry->id .
-                       ($is_new ? '&saved_added=1' : '&saved_changes=1') .
-                       ($ping_errors ? '&ping_errors=1' : ''));
+        $app->redirect($app->uri . '?__mode=view&amp;_type=entry&amp;blog_id=' .
+                       $entry->blog_id . '&amp;id=' . $entry->id .
+                       ($is_new ? '&amp;saved_added=1' : '&amp;saved_changes=1') .
+                       ($ping_errors ? '&amp;ping_errors=1' : ''));
     }
 }
 
@@ -2987,8 +3005,8 @@
             or return $app->error($app->translate(
                 "Saving placement failed: [_1]", $place->errstr));
     }
-    $app->redirect($app->uri . "?__mode=edit_placements&entry_id=$entry_id&" .
-                   'blog_id=' . $blog_id . '&saved=1');
+    $app->redirect($app->uri . "?__mode=edit_placements&amp;entry_id=$entry_id&amp;" .
+                   'blog_id=' . $blog_id . '&amp;saved=1');
 }
 
 sub _build_category_list {
@@ -3072,7 +3090,7 @@
     $param{saved} = $q->param('saved');
     $param{saved_deleted} = $q->param('saved_deleted');
     my $blog = MT::Blog->load(scalar $q->param('blog_id'));
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Categories'));
     $param{nav_categories} = 1;
     $app->build_page('edit_categories.tmpl', \%param);
@@ -3152,8 +3170,8 @@
   return $app->errtrans("The category must be given a name!") 
     if (!$cat);
 
-  $app->redirect($app->uri . '?__mode=list_cat&blog_id=' . $blog_id .
-                   '&saved=1&new_cat_id='.$cat->id);
+  $app->redirect($app->uri . '?__mode=list_cat&amp;blog_id=' . $blog_id .
+                   '&amp;saved=1&amp;new_cat_id='.$cat->id);
 }
 
 # sub save_categories {
@@ -3200,8 +3218,8 @@
 #             return $app->error($app->translate(
 #                 "Saving category failed: [_1]", $cat->errstr));
 #     }
-#     $app->redirect($app->uri . '?__mode=list_cat&blog_id=' . $blog_id .
-#                    '&saved=1');
+#     $app->redirect($app->uri . '?__mode=list_cat&amp;blog_id=' . $blog_id .
+#                    '&amp;saved=1');
 # }
 
 sub cfg_prefs {
@@ -3277,8 +3295,8 @@
     }
     @tmpl = sort { $a->{template_name} cmp $b->{template_name} } @tmpl;
     $param{templates} = \@tmpl;
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
-    $app->add_breadcrumb($app->translate('Configuration'), $app->uri . '?__mode=view&_type=blog&id=' . $blog->id . '&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
+    $app->add_breadcrumb($app->translate('Configuration'), $app->uri . '?__mode=view&amp;_type=blog&amp;id=' . $blog->id . '&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Archiving'));
     $param{nav_config} = 1;
     $app->build_page('cfg_archives.tmpl', \%param);
@@ -3337,8 +3355,8 @@
             $map->save;
         }
     }
-    $app->redirect($app->uri . "?__mode=cfg_archives&blog_id=$blog_id&saved=1"
-        . ($old_types ne $blog->archive_type ? '&archives_changed=1' : ''));
+    $app->redirect($app->uri . "?__mode=cfg_archives&amp;blog_id=$blog_id&amp;saved=1"
+        . ($old_types ne $blog->archive_type ? '&amp;archives_changed=1' : ''));
 }
 
 sub cfg_archives_add {
@@ -3387,8 +3405,8 @@
     $map->save
         or return $app->error($app->translate(
             "Saving map failed: [_1]", $map->errstr));
-    $app->redirect($app->uri . '?__mode=cfg_archives&blog_id='
-		   . $blog_id . '&saved_added=1');
+    $app->redirect($app->uri . '?__mode=cfg_archives&amp;blog_id='
+		   . $blog_id . '&amp;saved_added=1');
 }
 
 sub preview_entry {
@@ -3433,8 +3474,10 @@
         next if $col eq 'created_on' || $col eq 'created_by' ||
                 $col eq 'modified_on' || $col eq 'modified_by' ||
                 $col eq 'author_id';
+        my $val = scalar $q->param($col);
+#        $val =~ s/\r/&#xA;/g;
         push @data, { data_name => $col,
-            data_value => scalar $q->param($col) };
+            data_value => $val };
     }
     for my $date (qw( created_on_old created_on_manual )) {
         push @data, { data_name => $date,
@@ -3486,7 +3529,7 @@
         $param{index_tmpl_name} = $tmpl->name;
     }
     $app->add_breadcrumb($blog->name, 
-                         $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+                         $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Rebuild Site'));
     $param{rebuild_option_loop} = \@RebuildOptions;
     $app->build_page('rebuild_confirm.tmpl', \%param);
@@ -3561,8 +3604,8 @@
     eval "require " . $API{$type};
     my $obj = $API{$type}->load($id) 
         or die "object_edit_uri could not find $type object $id";
-    $app->uri() . '?__mode=view&_type=' . $type . '&blog_id='
-        . $obj->blog_id. '&id=' . $_[1];
+    $app->uri() . '?__mode=view&amp;_type=' . $type . '&amp;blog_id='
+        . $obj->blog_id. '&amp;id=' . $_[1];
 }
 
 sub rebuild_pages {
@@ -3744,8 +3799,8 @@
                 $type =~ /index-(\d+)/;
                 my $tmpl_id = $1;
                 return $app->redirect($app->uri()
-                                      . '?__mode=view&_type=template&id='
-                                      . ($tmpl_id) . '&blog_id=' . $blog->id);
+                                      . '?__mode=view&amp;_type=template&amp;id='
+                                      . ($tmpl_id) . '&amp;blog_id=' . $blog->id);
             } else {                     # popup--just go to cnfrmn. page
                 return $app->build_page('rebuilt.tmpl', \%param);
             }
@@ -3881,8 +3936,8 @@
             $pe->save;
         }
     }
-    my $url = $app->uri . '?__mode=edit_permissions&author_id=' . $author_id .
-              '&saved=1';
+    my $url = $app->uri . '?__mode=edit_permissions&amp;author_id=' . $author_id .
+              '&amp;saved=1';
     if (my $blog_id = $q->param('add_role_mask')) {
         my $pe = MT::Permission->load({ author_id => $author_id,
                                         blog_id => $blog_id });
@@ -3896,7 +3951,7 @@
         $pe->save;
         require MT::Blog;
         my $blog = MT::Blog->load($blog_id);
-        $url .= '&saved_add_to_blog=' . $blog->name;
+        $url .= '&amp;saved_add_to_blog=' . $blog->name;
     }
     $app->redirect($url);
 }
@@ -3976,8 +4031,8 @@
              "Error sending mail ([_1]); try another MailTransfer setting?",
              MT::Mail->errstr));
     }
-    $app->redirect($app->uri . '?__mode=view&_type=entry&blog_id=' .
-        $entry->blog_id . '&id=' . $entry->id . '&saved_notify=1');
+    $app->redirect($app->uri . '?__mode=view&amp;_type=entry&amp;blog_id=' .
+        $entry->blog_id . '&amp;id=' . $entry->id . '&amp;saved_notify=1');
 }
 
 sub start_upload {
@@ -3989,7 +4044,7 @@
     my $blog_id = $app->{query}->param('blog_id');
     require MT::Blog;
     my $blog = MT::Blog->load($blog_id);
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb('Upload File');
     $app->build_page('upload.tmpl', {
         local_archive_path => encode_js($blog->archive_path),
@@ -4213,7 +4268,7 @@
     return $app->error($app->translate("Permission denied."))
         unless $perms->can_post;
     my $blog = MT::Blog->load(scalar $app->{query}->param('blog_id'));
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Search & Replace'));
     $app->build_page('search_replace.tmpl',
         { search_cols_title => 1, search_cols_text => 1,
@@ -4301,7 +4356,7 @@
         $res{'search_cols_' . $col} = 1;
     }
     my $blog = MT::Blog->load(scalar $app->{query}->param('blog_id'));
-    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&blog_id=' . $blog->id);
+    $app->add_breadcrumb($blog->name, $app->uri . '?__mode=menu&amp;blog_id=' . $blog->id);
     $app->add_breadcrumb($app->translate('Search & Replace'), '');
     $res{nav_search} = 1;
     $app->build_page('search_replace.tmpl', \%res);
@@ -4832,11 +4887,11 @@
     $perms->save
         or return $app->error($app->translate(
             "Saving permissions failed: [_1]", $perms->errstr));
-    my $url = $app->uri . '?__mode=view&_type=entry';
+    my $url = $app->uri . '?__mode=view&amp;_type=entry';
     if (my $id = $q->param('entry_id')) {
-        $url .= '&id=' . $id;
+        $url .= '&amp;id=' . $id;
     }
-    $url .= '&blog_id=' . $perms->blog_id . '&saved_prefs=1';
+    $url .= '&amp;blog_id=' . $perms->blog_id . '&amp;saved_prefs=1';
     $app->build_page('reload_opener.tmpl', { url => $url });
 }
 
@@ -4890,8 +4945,8 @@
 sub reg_file {
     my $app = shift;
     my $q = $app->{query};
-    my $uri = $app->base . $app->uri . '?__mode=reg_bm_js&bm_show=' .
-              $q->param('bm_show') . '&bm_height=' . $q->param('bm_height');
+    my $uri = $app->base . $app->uri . '?__mode=reg_bm_js&amp;bm_show=' .
+              $q->param('bm_show') . '&amp;bm_height=' . $q->param('bm_height');
     $app->{no_print_body} = 1;
     $app->set_header('Content-Disposition' => 'attachment; filename=mt.reg');
     $app->send_http_header('text/plain; name=mt.reg');
@@ -5038,8 +5093,8 @@
                     "Setting up mappings failed: [_1]", $map->errstr));
         }
     }
-    $app->redirect($app->uri . '?__mode=list&_type=template&blog_id=' .
-                   $blog->id . '&reset=1');
+    $app->redirect($app->uri . '?__mode=list&amp;_type=template&amp;blog_id=' .
+                   $blog->id . '&amp;reset=1');
 }
 
 sub set_dynamicity {
@@ -5149,7 +5204,7 @@
         umask($old_umask);
         $params .= "&no_cachedir=1" unless -d $compiled_template_path;
     }
-    $app->redirect($app->uri . '?__mode=list&_type=template&dynamic_set=1&blog_id=' . $blog->id . $params);
+    $app->redirect($app->uri . '?__mode=list&amp;_type=template&amp;dynamic_set=1&amp;blog_id=' . $blog->id . $params);
 }
 
 1;
--- tmpl/cms/edit_category.tmpl.orig	2005-05-24 12:37:39.000000000 -0500
+++ tmpl/cms/edit_category.tmpl	2005-05-24 12:39:27.000000000 -0500
@@ -38,9 +38,9 @@
 </TMPL_IF>
 </p>
 		
-<p><label class="bold"><input type="radio" name="allow_pings" value="1"<TMPL_IF NAME=ALLOW_PINGS> checked</TMPL_IF> /><MT_TRANS phrase="On"></label>
+<p><label class="bold"><input type="radio" name="allow_pings" value="1"<TMPL_IF NAME=ALLOW_PINGS> checked="checked"</TMPL_IF> /><MT_TRANS phrase="On"></label>
 &nbsp;&nbsp;
-<label class="bold"><input type="radio" name="allow_pings" value="0"<TMPL_UNLESS NAME=ALLOW_PINGS> checked</TMPL_UNLESS> /><MT_TRANS phrase="Off"></label></p>
+<label class="bold"><input type="radio" name="allow_pings" value="0"<TMPL_UNLESS NAME=ALLOW_PINGS> checked="checked"</TMPL_UNLESS> /><MT_TRANS phrase="Off"></label></p>
 
 <TMPL_IF NAME=TB_URL>
 <p><label class="bold" for="tb_passphrase"><MT_TRANS phrase="Passphrase Protection (Optional)"></label> <a href="#" onclick="return openManual('categories', 'item_passphrase_protection')" class="help">?</a><br />
