From a597354bcb48536f2c7633d53c78fa931b186c20 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 31 May 2005 21:14:27 +0000 Subject: - Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for tags. --- includes/common.inc | 9 ++++++++- includes/theme.inc | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index b7210f668..bae9c2554 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1613,7 +1613,6 @@ function drupal_attributes($attributes = array()) { foreach ($attributes as $key => $value) { $t[] = $key .'="'. check_plain($value) .'"'; } - return ' '. implode($t, ' '); } } @@ -1973,6 +1972,14 @@ if (version_compare(phpversion(), '5.0') < 0) { '); } +/** + * Add a tag to the page's HEAD. + */ +function drupal_add_link($attributes) { + drupal_set_html_head('\n"); +} + + /** * Add a JavaScript file to the output. * diff --git a/includes/theme.inc b/includes/theme.inc index 6f90399d7..fa3a646aa 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -501,7 +501,7 @@ function theme_links($links, $delimiter = ' | ') { function theme_image($path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { if (!$getsize || (file_exists($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) { $attributes = drupal_attributes($attributes); - return "\"$alt\""; + return ''. check_plain($alt) .''; } } -- cgit v1.2.3