summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.inc10
-rw-r--r--modules/comment/comment.module9
2 files changed, 14 insertions, 5 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 65be70305..043e4e2bd 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -530,12 +530,18 @@ function theme_links($links, $attributes = array('class' => 'links')) {
$extra_class = ($i == 1) ? 'first ' : (($i == $num_links) ? 'last ' : '');
$output .= '<li class="'. $extra_class . $class .'">';
+ // Is the title HTML?
+ $html = isset($link['html']) && $link['html'];
+
if ($link['href']) {
- $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']);
+ $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html);
}
else if ($link['title']) {
//Some links are actually not links, but we wrap these in <span> for adding title and class attributes
- $output .= '<span'. drupal_attributes($link['attributes']) .'>'. check_plain($link['title']) .'</span>';
+ if (!$html) {
+ $link['title'] = check_plain($link['title']);
+ }
+ $output .= '<span'. drupal_attributes($link['attributes']) .'>'. $link['title'] .'</span>';
}
$i++;
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 95570f67f..d2f85e895 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -230,7 +230,7 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
);
}
else {
- $links['comment_forbidden']['#title'] = theme('comment_post_forbidden', $node->nid);
+ $links['comment_forbidden']['title'] = theme('comment_post_forbidden', $node->nid);
}
}
}
@@ -252,7 +252,7 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
}
}
else {
- $links['comment_forbidden']['#title'] = theme('comment_post_forbidden', $node->nid);
+ $links['comment_forbidden']['title'] = theme('comment_post_forbidden', $node->nid);
}
}
}
@@ -261,6 +261,9 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
if ($type == 'comment') {
$links = comment_links($node, $teaser);
}
+ if (isset($links['comment_forbidden'])) {
+ $links['comment_forbidden']['html'] = TRUE;
+ }
return $links;
}
@@ -735,7 +738,7 @@ function comment_links($comment, $return = 1) {
);
}
else {
- $links['comment_forbidden']['#title'] = theme('comment_post_forbidden', $comment->nid);
+ $links['comment_forbidden']['title'] = theme('comment_post_forbidden', $comment->nid);
}
}