Make WordPress Core


Ignore:
Timestamp:
10/17/2022 11:29:55 AM (4 years ago)
Author:
audrasjb
Message:

Comments: Apply kses when editing comments.

Props davidbaumwald, xknown, peterwilsoncc, paulkevan.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php

    r54090 r54527  
    29732973                                        'author_name'       => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
    29742974                                        'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
     2975                                        'author'            => self::$editor_id,
    29752976                                ),
    29762977                                array(
    … …  
    29812982                                        'author_name'       => 'div strong',
    29822983                                        'author_user_agent' => 'div strong',
     2984                                        'author'            => self::$editor_id,
    29832985                                )
    29842986                        );
    … …  
    29902992                                        'author_name'       => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
    29912993                                        'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
     2994                                        'author'            => self::$editor_id,
    29922995                                ),
    29932996                                array(
    … …  
    29983001                                        'author_name'       => 'div strong',
    29993002                                        'author_user_agent' => 'div strong',
     3003                                        'author'            => self::$editor_id,
    30003004                                )
    30013005                        );
    … …  
    30123016                                'author_name'       => '\\\&\\\ &amp; &invalid; < &lt; &amp;lt;',
    30133017                                'author_user_agent' => '\\\&\\\ &amp; &invalid; < &lt; &amp;lt;',
     3018                                'author'            => self::$superadmin_id,
    30143019                        ),
    30153020                        array(
    … …  
    30203025                                'author_name'       => '\\\&amp;\\\ &amp; &amp;invalid; &lt; &lt; &amp;lt;',
    30213026                                'author_user_agent' => '\\\&\\\ &amp; &invalid; &lt; &lt; &amp;lt;',
     3027                                'author'            => self::$superadmin_id,
    30223028                        )
    30233029                );
    … …  
    30333039                                'author_name'       => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
    30343040                                'author_user_agent' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
     3041                                'author'            => self::$superadmin_id,
    30353042                        ),
    30363043                        array(
    … …  
    30413048                                'author_name'       => 'div strong',
    30423049                                'author_user_agent' => 'div strong',
     3050                                'author'            => self::$superadmin_id,
    30433051                        )
    30443052                );
Note: See TracChangeset for help on using the changeset viewer.