diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 3357532..c1514e5 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2469,7 +2469,7 @@ function template_preprocess_html(&$variables) {
   else {
     $head_title = array('name' => check_plain($site_config->get('name')));
     if ($site_config->get('slogan')) {
-      $head_title['slogan'] = filter_xss_admin($site_config->get('slogan'));
+      $head_title['slogan'] = strip_tags(filter_xss_admin($site_config->get('slogan')));
     }
   }
   $variables['head_title_array'] = $head_title;
@@ -2564,7 +2564,7 @@ function template_preprocess_page(&$variables) {
   $variables['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
   $variables['secondary_menu']    = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
   $variables['action_links']      = menu_local_actions();
-  $variables['site_name']         = (theme_get_setting('toggle_name') ? filter_xss_admin($site_config->get('name')) : '');
+  $variables['site_name']         = (theme_get_setting('toggle_name') ? check_plain($site_config->get('name')) : '');
   $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? filter_xss_admin($site_config->get('slogan')) : '');
   $variables['tabs']              = menu_local_tabs();
 
@@ -2755,13 +2755,13 @@ function template_preprocess_maintenance_page(&$variables) {
   if (drupal_get_title()) {
     $head_title = array(
       'title' => strip_tags(drupal_get_title()),
-      'name' => $site_name,
+      'name' => check_plain($site_name),
     );
   }
   else {
-    $head_title = array('name' => $site_name);
+    $head_title = array('name' => check_plain($site_name));
     if ($site_slogan) {
-      $head_title['slogan'] = $site_slogan;
+      $head_title['slogan'] = strip_tags(filter_xss_admin($site_slogan));
     }
   }
 
@@ -2778,8 +2778,8 @@ function template_preprocess_maintenance_page(&$variables) {
   $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
   $variables['main_menu']         = array();
   $variables['secondary_menu']    = array();
-  $variables['site_name']         = (theme_get_setting('toggle_name') ? $site_name : '');
-  $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? $site_slogan : '');
+  $variables['site_name']         = (theme_get_setting('toggle_name') ? check_plain($site_name) : '');
+  $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? filter_xss_admin($site_slogan) : '');
   $variables['tabs']              = '';
   $variables['title']             = drupal_get_title();
 
diff --git a/core/themes/bartik/template.php b/core/themes/bartik/template.php
index eaeb38d..c23e437 100644
--- a/core/themes/bartik/template.php
+++ b/core/themes/bartik/template.php
@@ -54,7 +54,7 @@ function bartik_process_page(&$variables) {
   $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
   if ($variables['hide_site_name']) {
     // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
-    $variables['site_name'] = filter_xss_admin($site_config->get('name'));
+    $variables['site_name'] = check_plain($site_config->get('name'));
   }
   if ($variables['hide_site_slogan']) {
     // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
@@ -102,7 +102,7 @@ function bartik_process_maintenance_page(&$variables) {
   $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
   if ($variables['hide_site_name']) {
     // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
-    $variables['site_name'] = filter_xss_admin($site_config->get('name'));
+    $variables['site_name'] = check_plain($site_config->get('name'));
   }
   if ($variables['hide_site_slogan']) {
     // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
