From be14203534c5f09d0c70c2bf59b81b80f2a90b32 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 31 Mar 2005 09:25:33 +0000 Subject: - #18817: Clean up plain-text checking (see drupal-devel!) --- themes/chameleon/chameleon.theme | 8 +++++--- themes/engines/xtemplate/xtemplate.engine | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'themes') diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 78d0cc5e3..86c774c10 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -18,10 +18,12 @@ function chameleon_features() { function chameleon_page($content) { $language = $GLOBALS['locale']; + $title = drupal_get_title(); + $output = "\n"; $output .= "\n"; $output .= "\n"; - $output .= " ". ($title ? $title ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."\n"; + $output .= " ". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."\n"; $output .= drupal_get_html_head(); $output .= " \n"; $output .= theme_get_styles(); @@ -63,7 +65,7 @@ function chameleon_page($content) { $output .= " \n"; - if ($title = drupal_get_title()) { + if ($title) { $output .= theme("breadcrumb", drupal_get_breadcrumb()); $output .= "

$title

"; } @@ -107,7 +109,7 @@ function chameleon_node($node, $main = 0, $page = 0) { $output = "
\n"; if (!$page) { - $output .= "

". ($main ? l($node->title, "node/$node->nid") : $node->title) ."

\n"; + $output .= "

". ($main ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."

\n"; } $output .= "
\n"; diff --git a/themes/engines/xtemplate/xtemplate.engine b/themes/engines/xtemplate/xtemplate.engine index 0a5a16a43..c7bb12d18 100644 --- a/themes/engines/xtemplate/xtemplate.engine +++ b/themes/engines/xtemplate/xtemplate.engine @@ -45,7 +45,7 @@ function xtemplate_node($node, $main = 0, $page = 0) { array("%a" => format_name($node), "%b" => format_date($node->created))) : '', "link" => url("node/$node->nid"), - "title" => $node->title, + "title" => check_plain($node->title), "author" => format_name($node), "date" => format_date($node->created), "sticky" => ($main && $node->sticky) ? 'sticky' : '', @@ -116,7 +116,7 @@ function xtemplate_page($content) { $xtemplate->template->assign(array( "language" => $GLOBALS['locale'], - "head_title" => (drupal_get_title() ? drupal_get_title() ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")), + "head_title" => (drupal_get_title() ? strip_tags(drupal_get_title()) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")), "head" => drupal_get_html_head(), "styles" => theme_get_styles(), "onload_attributes" => theme_onload_attribute(), -- cgit v1.2.3