Index: /trunk/lib/App.inc.php
===================================================================
--- /trunk/lib/App.inc.php	(revision 762)
+++ /trunk/lib/App.inc.php	(revision 763)
@@ -1335,9 +1335,9 @@
                     foreach ($val as $subval) {
                         if ('' != $key && '' != $subval) {
-                            $out .= sprintf('<input type="hidden" name="%s[]" value="%s" />', $key, $subval);
+                            $out .= sprintf('<input type="hidden" name="%s[]" value="%s" />', oTxt($key), oTxt($subval));
                         }
                     }
                 } else if ('' != $key && '' != $val) {
-                    $out .= sprintf('<input type="hidden" name="%s" value="%s" />', $key, $val);
+                    $out .= sprintf('<input type="hidden" name="%s" value="%s" />', oTxt($key), oTxt($val));
                 }
             }
@@ -1355,5 +1355,5 @@
         && $this->getParam('session_use_trans_sid')
         ) {
-            $out .= sprintf('<input type="hidden" name="%s" value="%s" />', session_name(), session_id());
+            $out .= sprintf('<input type="hidden" name="%s" value="%s" />', oTxt(session_name()), oTxt(session_id()));
         }
 
@@ -1361,5 +1361,5 @@
         // This token can be validated upon form submission with $app->verifyCSRFToken() or $app->requireValidCSRFToken()
         if ($this->getParam('csrf_token_enabled') && $include_csrf_token) {
-            $out .= sprintf('<input type="hidden" name="%s" value="%s" />', $this->getParam('csrf_token_name'), $this->getCSRFToken());
+            $out .= sprintf('<input type="hidden" name="%s" value="%s" />', oTxt($this->getParam('csrf_token_name')), oTxt($this->getCSRFToken()));
         }
 
@@ -1530,5 +1530,5 @@
         } else {
             // Fallback: die using meta refresh instead.
-            printf('<meta http-equiv="refresh" content="0;url=%s" />', $url);
+            printf('<meta http-equiv="refresh" content="0;url=%s" />', oTxt($url));
             $this->logMsg(sprintf('dieURL (refresh): %s; headers already sent (output started in %s : %s)', $url, $h_file, $h_line), LOG_NOTICE, __FILE__, __LINE__);
         }
Index: /trunk/lib/HTML.inc.php
===================================================================
--- /trunk/lib/HTML.inc.php	(revision 762)
+++ /trunk/lib/HTML.inc.php	(revision 763)
@@ -78,5 +78,5 @@
                 echo '<li><a';
                 foreach (array_diff_key($b, array('value' => null)) as $key => $value) {
-                    printf(' %s="%s"', $key, oTxt($value));
+                    printf(' %s="%s"', oTxt($key), oTxt($value));
                 }
                 echo '>' . oTxt($b['value']) . '</a></li>';
@@ -88,5 +88,5 @@
                 echo '<li><input';
                 foreach ($b as $key => $value) {
-                    printf(' %s="%s"', $key, oTxt($value));
+                    printf(' %s="%s"', oTxt($key), oTxt($value));
                 }
                 echo ' /></li>';
@@ -247,7 +247,7 @@
             printf('<option value="%s"%s%s%s>%s</option>',
                 oTxt($o['value']),
-                (isset($o['class']) && sprintf(' class="%s"', $o['class']) ? : ''),
-                (isset($o['selected']) && $o['selected'] ? ' selected="selected"' : ''),
-                (isset($o['disabled']) && $o['disabled'] ? ' disabled="disabled"' : ''),
+                (isset($o['class']) && sprintf(' class="%s"', oTxt($o['class'])) ? : ''),
+                (isset($o['selected']) && oTxt($o['selected']) ? ' selected="selected"' : ''),
+                (isset($o['disabled']) && oTxt($o['disabled']) ? ' disabled="disabled"' : ''),
                 oTxt($o['text'])
             );
@@ -280,7 +280,7 @@
         foreach ($options as $value => $text) {
             printf('<option value="%s"%s>%s</option>',
-                $value,
+                oTxt($value),
                 $preselected == $value ? ' selected="selected"' : '',
-                $text
+                oTxt($text)
             );
         }
Index: /trunk/lib/Image.inc.php
===================================================================
--- /trunk/lib/Image.inc.php	(revision 762)
+++ /trunk/lib/Image.inc.php	(revision 763)
@@ -152,5 +152,5 @@
 
         return sprintf('<img src="%s" %s alt="%s" %s />',
-            $src,
+            oTxt($src),
             $image_size,
             oTxt($alt),
Index: /trunk/lib/PayPal.inc.php
===================================================================
--- /trunk/lib/PayPal.inc.php	(revision 762)
+++ /trunk/lib/PayPal.inc.php	(revision 763)
@@ -4,5 +4,5 @@
  * For details visit the project site: <http://trac.strangecode.com/codebase/>
  * Copyright 2001-2012 Strangecode, LLC
- * 
+ *
  * This file is part of The Strangecode Codebase.
  *
@@ -11,10 +11,10 @@
  * Free Software Foundation, either version 3 of the License, or (at your option)
  * any later version.
- * 
+ *
  * The Strangecode Codebase is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  * details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with
  * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
@@ -212,5 +212,5 @@
     {
         ?>
-        <form action="<?php echo $this->_buttons[$name]['options']['button_url']; ?>" method="post">
+        <form action="<?php echo oTxt($this->_buttons[$name]['options']['button_url']); ?>" method="post">
         <?php
         if (is_array($this->_buttons[$name]['options']) && !empty($this->_buttons[$name]['options'])) {
@@ -218,5 +218,5 @@
                 if (!in_array($key, array('button_url', 'link_url', 'submit_img', 'submit_text'))) {
                     ?>
-                    <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $val; ?>" />
+                    <input type="hidden" name="<?php echo oTxt($key); ?>" value="<?php echo oTxt($val); ?>" />
                     <?php
                 }
@@ -224,5 +224,5 @@
         }
         ?>
-        <input type="image" src="<?php echo $this->_buttons[$name]['options']['submit_img']; ?>" border="0" name="submit" alt="<?php echo $this->_buttons[$name]['options']['submit_text']; ?>" />
+        <input type="image" src="<?php echo oTxt($this->_buttons[$name]['options']['submit_img']); ?>" border="0" name="submit" alt="<?php echo oTxt($this->_buttons[$name]['options']['submit_text']); ?>" />
         </form>
         <?php
@@ -257,5 +257,5 @@
     {
         $app =& App::getInstance();
-    
+
         if (array_key_exists($param, $this->_params)) {
             return $this->_params[$param];
Index: /trunk/lib/Utilities.inc.php
===================================================================
--- /trunk/lib/Utilities.inc.php	(revision 762)
+++ /trunk/lib/Utilities.inc.php	(revision 763)
@@ -319,10 +319,10 @@
             // Remove http schemas, and any single trailing / to make the display URL.
             $display_url = preg_replace(['!^https?://!u', '!^([^/]+)/$!u'], ['', '$1'], $url);
-            return sprintf('<a href="%s">%s</a>', oTxt($absolute_url), $display_url);
+            return sprintf('<a href="%s">%s</a>', oTxt($absolute_url), oTxt($display_url));
         } else {
             // Truncated URL.
             // Remove http schemas, and any single trailing / to make the display URL.
             $display_url = preg_replace(['!^https?://!u', '!^([^/]+)/$!u'], ['', '$1'], trim($truncated_url));
-            return sprintf('<a href="%s">%s%s</a>', oTxt($absolute_url), $display_url, $delim);
+            return sprintf('<a href="%s">%s%s</a>', oTxt($absolute_url), oTxt($display_url), $delim);
         }
     }, $text);
@@ -349,5 +349,5 @@
         if ('' != trim($w)) {
             $search[] = '/\b(' . preg_quote($w) . ')\b/i' . $app->getParam('preg_u');
-            $replace[] = '<span class="' . $class . '">$1</span>';
+            $replace[] = '<span class="' . oTxt($class) . '">$1</span>';
         }
     }
Index: /trunk/services/logs.php
===================================================================
--- /trunk/services/logs.php	(revision 762)
+++ /trunk/services/logs.php	(revision 763)
@@ -70,5 +70,5 @@
 
 // Titles and navigation header.
-$nav->add(sprintf(_("Viewing <em>%s</em>"), $tmp_prefs->get('log_file')), '/admin/logs.php');
+$nav->add(sprintf(_("Viewing <em>%s</em>"), oTxt($tmp_prefs->get('log_file'))), '/admin/logs.php');
 $nav->set('id', 'logs');
 
Index: /trunk/services/password.php
===================================================================
--- /trunk/services/password.php	(revision 762)
+++ /trunk/services/password.php	(revision 763)
@@ -41,5 +41,5 @@
 
 // Titles and navigation header.
-$nav->add(sprintf(_("Change password for <em>%s</em>"), $auth->get('username')));
+$nav->add(sprintf(_("Change password for <em>%s</em>"), oTxt($auth->get('username'))));
 $nav->set('id', 'password');
 
Index: /trunk/services/reset_password.php
===================================================================
--- /trunk/services/reset_password.php	(revision 762)
+++ /trunk/services/reset_password.php	(revision 763)
@@ -69,5 +69,5 @@
             $app->dieURL($auth->getParam('login_url'));
         } else {
-            $app->raiseMsg(sprintf(_("There was a problem resetting the password for <em>%s</em>. Please contact us if you need assistance."), getFormData('username')), MSG_WARNING, __FILE__, __LINE__);
+            $app->raiseMsg(sprintf(_("There was a problem resetting the password for <em>%s</em>. Please contact us if you need assistance."), oTxt(getFormData('username'))), MSG_WARNING, __FILE__, __LINE__);
             $app->logMsg(sprintf('Password reset for %s failed.', getFormData('username')), LOG_NOTICE, __FILE__, __LINE__);
             $frm = array('username' => getFormData('username'));
Index: /trunk/services/templates/login_form.ihtml
===================================================================
--- /trunk/services/templates/login_form.ihtml	(revision 762)
+++ /trunk/services/templates/login_form.ihtml	(revision 763)
@@ -3,5 +3,5 @@
 ?>
 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"<?php echo $autocomplete; ?>>
-<?php $app->printHiddenSession() ?>
+<?php $app->printHiddenSession(['boomerang']) ?>
 <table>
     <tr class="sc-form-row">
