diff --git a/ext/comment/theme.php b/ext/comment/theme.php
index 90e2fbd5..4ea3966d 100644
--- a/ext/comment/theme.php
+++ b/ext/comment/theme.php
@@ -101,9 +101,11 @@ class CommentListTheme extends Themelet {
$i_image_id = int_escape($comment->image_id);
$h_userlink = "$h_name";
+ $stripped_nonl = str_replace("\n", "\\n", $tfe->stripped);
+ $stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
$h_dellink = $user->is_admin() ?
"
($h_poster_ip, stripped."');\" ".
+ "onclick=\"return confirm('Delete comment by $h_name:\\n$stripped_nonl');\" ".
"href='".make_link("comment/delete/$i_comment_id/$i_image_id")."'>Del)" : "";
$h_imagelink = $trim ? ">>>\n" : "";
return "
$h_userlink: $h_comment $h_imagelink $h_dellink
";