From 0a301ec4b58b151aa2014677f7669570c9e7b25e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 23 Jun 2020 11:09:04 +0000 Subject: [PATCH] Docs: Use sentence case for comments in `tests/kses.php`, per the documentation standards. Follow-up to [48132]. See #49464, #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48139 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 4 ++-- tests/phpunit/tests/kses.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 300376197a..6bc1d005ba 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -1452,9 +1452,9 @@ function wp_kses_hair_parse( $attr ) { // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation $regex = '(?:' - . '[_a-zA-Z][-_a-zA-Z0-9:.]*' // Attribute name. + . '[_a-zA-Z][-_a-zA-Z0-9:.]*' // Attribute name. . '|' - . '\[\[?[^\[\]]+\]\]?' // Shortcode in the name position implies unfiltered_html. + . '\[\[?[^\[\]]+\]\]?' // Shortcode in the name position implies unfiltered_html. . ')' . '(?:' // Attribute value. . '\s*=\s*' // All values begin with '='. diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index deda0c8cef..3bf747ca40 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -629,22 +629,22 @@ EOF; "array[1]='z'z'z'z", false, ), - // using digit in attribute name should work + // Using a digit in attribute name should work. array( 'href="https://example.com/[shortcode attr=\'value\']" data-op3-timer-seconds="0"', array( 'href="https://example.com/[shortcode attr=\'value\']" ', 'data-op3-timer-seconds="0"' ), ), - // using underscore in attribute name should work + // Using an underscore in attribute name should work. array( 'href="https://example.com/[shortcode attr=\'value\']" data-op_timer-seconds="0"', array( 'href="https://example.com/[shortcode attr=\'value\']" ', 'data-op_timer-seconds="0"' ), ), - // using period in attribute name should work + // Using a period in attribute name should work. array( 'href="https://example.com/[shortcode attr=\'value\']" data-op.timer-seconds="0"', array( 'href="https://example.com/[shortcode attr=\'value\']" ', 'data-op.timer-seconds="0"' ), ), - // using digit at a beginning of attribute name should return false + // Using a digit at the beginning of attribute name should return false. array( 'href="https://example.com/[shortcode attr=\'value\']" 3data-op-timer-seconds="0"', false,