summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-03-31 09:25:33 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-03-31 09:25:33 +0000
commitbe14203534c5f09d0c70c2bf59b81b80f2a90b32 (patch)
treea489b0bdda01f9de5deba514bcffd3dce16b59ed /themes
parent99233a9c991635e801aebc276e4e2975b6ba9e20 (diff)
downloadbrdo-be14203534c5f09d0c70c2bf59b81b80f2a90b32.tar.gz
brdo-be14203534c5f09d0c70c2bf59b81b80f2a90b32.tar.bz2
- #18817: Clean up plain-text checking (see drupal-devel!)
Diffstat (limited to 'themes')
-rw-r--r--themes/chameleon/chameleon.theme8
-rw-r--r--themes/engines/xtemplate/xtemplate.engine4
2 files changed, 7 insertions, 5 deletions
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 = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
$output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n";
$output .= "<head>\n";
- $output .= " <title>". ($title ? $title ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
+ $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
$output .= drupal_get_html_head();
$output .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"themes/chameleon/common.css\" />\n";
$output .= theme_get_styles();
@@ -63,7 +65,7 @@ function chameleon_page($content) {
$output .= " <td id=\"main\">\n";
- if ($title = drupal_get_title()) {
+ if ($title) {
$output .= theme("breadcrumb", drupal_get_breadcrumb());
$output .= "<h2>$title</h2>";
}
@@ -107,7 +109,7 @@ function chameleon_node($node, $main = 0, $page = 0) {
$output = "<div class=\"node\">\n";
if (!$page) {
- $output .= " <h2 class=\"title\">". ($main ? l($node->title, "node/$node->nid") : $node->title) ."</h2>\n";
+ $output .= " <h2 class=\"title\">". ($main ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."</h2>\n";
}
$output .= " <div class=\"content\">\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(),