From fa94f51a61bf997152cef6e1b000092ef0318da3 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 27 Dec 2008 02:56:51 -0800 Subject: [PATCH] no new lines in javascript --- ext/comment/theme.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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

";