From eccd75e38cac69aefdfd97a8a4418072dd2b8e6c Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 15 Sep 2009 10:11:59 +0000 Subject: [PATCH] Strip \r when escaping strings for JS, props nbachiyski, fixes #7041 git-svn-id: http://svn.automattic.com/wordpress/trunk@11935 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 77f3ffa629..a88beb68e7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2199,8 +2199,10 @@ function htmlentities2($myHTML) { } /** - * Escape single quotes, specialchar double quotes, and fix line endings. + * Escape single quotes, htmlspecialchar " < > &, and fix line endings. * + * Escapes text strings for echoing in JS, both inline (for example in onclick="...") + * and inside