aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/comments.php2
-rw-r--r--comments.php2
-rw-r--r--include/common.inc.php1
-rw-r--r--include/picture_comment.inc.php5
4 files changed, 6 insertions, 4 deletions
diff --git a/admin/comments.php b/admin/comments.php
index 6bba32a96..bae32dcb3 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -162,7 +162,7 @@ while ($row = mysql_fetch_assoc($result))
'&image_id='.$row['image_id'],
'ID' => $row['id'],
'TN_SRC' => $thumb,
- 'AUTHOR' => $row['author'],
+ 'AUTHOR' => trigger_event('render_comment_author', $row['author']),
'DATE' => format_date($row['date'],'mysql_datetime',true),
'CONTENT' => trigger_event('render_comment_content',$row['content'])
)
diff --git a/comments.php b/comments.php
index de328152f..efcd7dfb5 100644
--- a/comments.php
+++ b/comments.php
@@ -411,7 +411,7 @@ SELECT id, name, permalink, uppercats
'U_PICTURE' => $url,
'TN_SRC' => $thumbnail_src,
'ALT' => $name,
- 'AUTHOR' => $author,
+ 'AUTHOR' => trigger_event('render_comment_author', $author),
'DATE'=>format_date($comment['date'],'mysql_datetime',true),
'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
));
diff --git a/include/common.inc.php b/include/common.inc.php
index 847a52b87..db7546da7 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -242,5 +242,6 @@ if (isset($conf['header_notes']))
// default event handlers
add_event_handler('render_comment_content', 'htmlspecialchars');
add_event_handler('render_comment_content', 'parse_comment_content');
+add_event_handler('render_comment_author', 'strip_tags');
trigger_action('init');
?>
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index cab49ffcf..6370544a7 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -136,9 +136,10 @@ SELECT id,author,date,image_id,content
$template->assign_block_vars(
'comments.comment',
array(
- 'COMMENT_AUTHOR' => empty($row['author'])
+ 'COMMENT_AUTHOR' => trigger_event('render_comment_author',
+ empty($row['author'])
? l10n('guest')
- : $row['author'],
+ : $row['author']),
'COMMENT_DATE' => format_date(
$row['date'],