Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.96
diff -u -9 -p -r1.96 .htaccess
--- .htaccess	15 Sep 2008 15:21:44 -0000	1.96
+++ .htaccess	3 Oct 2008 21:04:47 -0000
@@ -18,20 +18,21 @@ ErrorDocument 404 /index.php
 
 # Force simple error message for requests for non-existent favicon.ico.
 <Files favicon.ico>
   ErrorDocument 404 "The requested file favicon.ico was not found.
 </Files>
 
 # Set the default handler.
 DirectoryIndex index.php
 
-# Override PHP settings. More in sites/default/settings.php
-# but the following cannot be changed at runtime.
+# Override PHP settings that cannot be changed at runtime. See
+# sites/default/default.settings.php and _drupal_bootstrap() in
+# includes/bootstrap.inc for settings that can be changed at runtime.
 
 # PHP 5, Apache 1 and 2.
 <IfModule mod_php5.c>
   php_flag magic_quotes_gpc                 off
   php_flag register_globals                 off
   php_flag session.auto_start               off
   php_value mbstring.http_input             pass
   php_value mbstring.http_output            pass
   php_flag mbstring.encoding_translation    off
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.228
diff -u -9 -p -r1.228 bootstrap.inc
--- includes/bootstrap.inc	20 Sep 2008 20:22:23 -0000	1.228
+++ includes/bootstrap.inc	3 Oct 2008 21:04:48 -0000
@@ -990,18 +990,23 @@ function drupal_get_bootstrap_phase() {
   return $_drupal_current_bootstrap_phase;
 }
 
 function _drupal_bootstrap($phase) {
   global $conf;
 
   switch ($phase) {
 
     case DRUPAL_BOOTSTRAP_CONFIGURATION:
+      // Override PHP settings required for Drupal to work properly. The
+      // .htaccess file contains settings that cannot be changed at runtime.
+      // See sites/default/default.settings.php for more non-runtime settings.
+      ini_set('html_errors', '0');
+
       drupal_initialize_variables();
       // Start a page timer:
       timer_start('page');
       // Initialize the configuration
       conf_init();
       break;
 
     case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
       // Allow specifying special cache handlers in settings.php, like
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.799
diff -u -9 -p -r1.799 common.inc
--- includes/common.inc	20 Sep 2008 20:22:23 -0000	1.799
+++ includes/common.inc	3 Oct 2008 21:04:48 -0000
@@ -616,19 +616,19 @@ function drupal_error_handler($errno, $m
           break;
         }
       }
     }
 
     $entry = $types[$errno] . ': ' . $message . ' in ' . $filename . ' on line ' . $line . '.';
 
     // Force display of error messages in update.php.
     if (variable_get('error_level', 1) == 1 || strstr($_SERVER['SCRIPT_NAME'], 'update.php')) {
-      drupal_set_message($entry, 'error');
+      drupal_set_message(check_plain($entry), 'error');
     }
 
     watchdog('php', '%message in %file on line %line.', array('%error' => $types[$errno], '%message' => $message, '%file' => $filename, '%line' => $line), WATCHDOG_ERROR);
   }
 }
 
 /**
  * Gets the last caller (file name and line of the call, function in which the
  * call originated) from a backtrace.
Index: misc/drupal.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.js,v
retrieving revision 1.45
diff -u -9 -p -r1.45 drupal.js
--- misc/drupal.js	25 Jun 2008 07:45:03 -0000	1.45
+++ misc/drupal.js	3 Oct 2008 21:04:48 -0000
@@ -244,29 +244,29 @@ Drupal.getSelection = function (element)
   }
   return { 'start': element.selectionStart, 'end': element.selectionEnd };
 };
 
 /**
  * Build an error message from ahah response.
  */
 Drupal.ahahError = function(xmlhttp, uri) {
   if (xmlhttp.status == 200) {
-    if (jQuery.trim($(xmlhttp.responseText).text())) {
+    if (jQuery.trim(xmlhttp.responseText)) {
       var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText });
     }
     else {
-      var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText });
+      var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri});
     }
   }
   else {
     var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status });
   }
-  return message;
+  return message.replace(/\n/g, '<br />');
 }
 
 // Global Killswitch on the <html> element
 if (Drupal.jsEnabled) {
   // Global Killswitch on the <html> element
   $(document.documentElement).addClass('js');
   // 'js enabled' cookie
   document.cookie = 'has_js=1; path=/';
   // Attach all behaviors.
Index: sites/default/default.settings.php
===================================================================
RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v
retrieving revision 1.14
diff -u -9 -p -r1.14 default.settings.php
--- sites/default/default.settings.php	21 Aug 2008 19:36:39 -0000	1.14
+++ sites/default/default.settings.php	3 Oct 2008 21:04:48 -0000
@@ -194,22 +194,22 @@ $update_free_access = FALSE;
  * for you.
  */
 # $base_url = 'http://www.example.com';  // NO trailing slash!
 
 /**
  * PHP settings:
  *
  * To see what PHP settings are possible, including whether they can
  * be set at runtime (ie., when ini_set() occurs), read the PHP
- * documentation at http://www.php.net/manual/en/ini.php#ini.list
- * and take a look at the .htaccess file to see which non-runtime
- * settings are used there. Settings defined here should not be
- * duplicated there so as to avoid conflict issues.
+ * documentation: http://www.php.net/manual/en/ini.php#ini.list
+ * See _drupal_bootstrap() in includes/bootstrap.inc for required runtime
+ * settings and the .htaccess file for non-runtime settings. Settings defined
+ * there should not be duplicated here so as to avoid conflict issues.
  */
 ini_set('arg_separator.output',     '&amp;');
 ini_set('magic_quotes_runtime',     0);
 ini_set('magic_quotes_sybase',      0);
 ini_set('session.cache_expire',     200000);
 ini_set('session.cache_limiter',    'none');
 ini_set('session.cookie_lifetime',  2000000);
 ini_set('session.gc_maxlifetime',   200000);
 ini_set('session.save_handler',     'user');
