mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 07:04:34 +00:00
Comments: Apply kses when editing comments.
Props davidbaumwald, xknown, peterwilsoncc, paulkevan. git-svn-id: https://develop.svn.wordpress.org/trunk@54527 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2972,6 +2972,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
'content' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author' => self::$editor_id,
|
||||
),
|
||||
array(
|
||||
'content' => array(
|
||||
@@ -2980,6 +2981,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
),
|
||||
'author_name' => 'div strong',
|
||||
'author_user_agent' => 'div strong',
|
||||
'author' => self::$editor_id,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
@@ -2989,6 +2991,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
'content' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author' => self::$editor_id,
|
||||
),
|
||||
array(
|
||||
'content' => array(
|
||||
@@ -2997,6 +3000,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
),
|
||||
'author_name' => 'div strong',
|
||||
'author_user_agent' => 'div strong',
|
||||
'author' => self::$editor_id,
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -3011,6 +3015,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
'content' => '\\\&\\\ & &invalid; < < &lt;',
|
||||
'author_name' => '\\\&\\\ & &invalid; < < &lt;',
|
||||
'author_user_agent' => '\\\&\\\ & &invalid; < < &lt;',
|
||||
'author' => self::$superadmin_id,
|
||||
),
|
||||
array(
|
||||
'content' => array(
|
||||
@@ -3019,6 +3024,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
),
|
||||
'author_name' => '\\\&\\\ & &invalid; < < &lt;',
|
||||
'author_user_agent' => '\\\&\\\ & &invalid; < < &lt;',
|
||||
'author' => self::$superadmin_id,
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -3032,6 +3038,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
'content' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_name' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
|
||||
'author' => self::$superadmin_id,
|
||||
),
|
||||
array(
|
||||
'content' => array(
|
||||
@@ -3040,6 +3047,7 @@ class WP_Test_REST_Comments_Controller extends WP_Test_REST_Controller_Testcase
|
||||
),
|
||||
'author_name' => 'div strong',
|
||||
'author_user_agent' => 'div strong',
|
||||
'author' => self::$superadmin_id,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user