Index: branches/1.1dev/lib/TemplateGlue.inc.php
===================================================================
--- branches/1.1dev/lib/TemplateGlue.inc.php	(revision 310)
+++ branches/1.1dev/lib/TemplateGlue.inc.php	(revision 351)
@@ -96,5 +96,5 @@
         foreach ($blank as $key=>$val) {
             $selected = ($preselected == $val) ? ' selected="selected"' : '';
-            ?><option value="<?php echo $key; ?>"<?php echo $selected; ?>><?php echo oTxt($val); ?></option>
+            ?><option value="<?php echo oTxt($key); ?>"<?php echo $selected; ?>><?php echo oTxt($val); ?></option>
             <?php
         }
@@ -102,5 +102,5 @@
 	foreach ($values as $item) {
 		$selected = ($item == $preselected) ? ' selected' : '';
-		?><option value="<?php echo $item; ?>"<?php echo $selected; ?>><?php echo oTxt($item); ?></option>
+		?><option value="<?php echo oTxt($item); ?>"<?php echo $selected; ?>><?php echo oTxt($item); ?></option>
 		<?php
 	}
@@ -169,9 +169,9 @@
             if ('allone' == $flag) {
                 // Print a cell with multidimentioal array checkboxes.
-                ?><td><label class="normal"><input type="checkbox" name="dbcol[<?php echo $db_col; ?>][<?php echo $item; ?>]"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
+                ?><td><label class="normal"><input type="checkbox" name="dbcol[<?php echo oTxt($db_col); ?>][<?php echo oTxt($item); ?>]"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
                 <?php
              } else {
                 // Print a cell with basic named checkboxes.
-                ?><td><label class="normal"><input type="checkbox" name="<?php echo $db_col; ?>[<?php echo $item; ?>]"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
+                ?><td><label class="normal"><input type="checkbox" name="<?php echo oTxt($db_col); ?>[<?php echo oTxt($item); ?>]"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
                 <?php
             }
@@ -248,5 +248,5 @@
             }
             // Print a cell with basic named checkboxes.
-            ?><td><label class="normal"><input type="radio" name="<?php echo $db_col; ?>" value="<?php echo $item ?>"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
+            ?><td><label class="normal"><input type="radio" name="<?php echo oTxt($db_col); ?>" value="<?php echo oTxt($item) ?>"<?php echo $checked; ?> />&nbsp;<?php echo oTxt($item); ?></label>&nbsp;</td>
             <?php
         }
@@ -289,5 +289,5 @@
         foreach ($blank as $key=>$val) {
             $selected = in_array($val, $preselected) ? ' selected="selected"' : '';
-            ?><option value="<?php echo $key; ?>"<?php echo $selected; ?>><?php echo oTxt($val); ?></option>
+            ?><option value="<?php echo oTxt($key); ?>"<?php echo $selected; ?>><?php echo oTxt($val); ?></option>
             <?php
         }
@@ -298,5 +298,5 @@
 	while ($row = mysql_fetch_assoc($qid)) {
 		$selected = in_array($row[$val_column_name], $preselected) ? ' selected="selected"' : '';
-		?><option value="<?php echo $row[$val_column_name]; ?>"<?php echo $selected; ?>><?php echo oTxt($row[$key_column_name]); ?></option><?php
+		?><option value="<?php echo oTxt($row[$val_column_name]); ?>"<?php echo $selected; ?>><?php echo oTxt($row[$key_column_name]); ?></option><?php
 	}
 }
@@ -395,5 +395,5 @@
         
         // Print a cell with basic named checkboxes.
-        ?><td><input type="checkbox" id="<?php echo $val_column . '-' . $box[$val_column]; ?>" name="<?php echo $val_column; ?>[<?php echo $box[$val_column]; ?>]"<?php echo $checked; ?> /></td><td><label for="<?php echo $val_column . '-' . $box[$val_column]; ?>"><?php echo oTxt($box[$key_column]); ?></label></td>
+        ?><td><input type="checkbox" id="<?php echo oTxt($val_column . '-' . $box[$val_column]); ?>" name="<?php echo oTxt($val_column); ?>[<?php echo oTxt($box[$val_column]); ?>]"<?php echo $checked; ?> /></td><td><label for="<?php echo $val_column . '-' . $box[$val_column]; ?>"><?php echo oTxt($box[$key_column]); ?></label></td>
         <?php
     }
