Make WordPress Core

Changeset 57910


Ignore:
Timestamp:
04/01/2024 08:53:55 PM (11 months ago)
Author:
audrasjb
Message:

Docs: Various typo corrections in wp-includes/formatting.php.

Props shailu25.
Fixes #60814.
See #60699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r57626 r57910  
    29472947    if ( ')' === $matches[3] && strpos( $url, '(' ) ) {
    29482948        /*
    2949          * If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it,
     2949         * If the trailing character is a closing parenthesis, and the URL has an opening parenthesis in it,
    29502950         * add the closing parenthesis to the URL. Then we can let the parenthesis balancer do its thing below.
    29512951         */
     
    31063106        if ( 10000 < strlen( $piece ) ) {
    31073107            // ...break it up.
    3108             foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses.
     3108            foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing parentheses.
    31093109                if ( 2101 < strlen( $chunk ) ) {
    31103110                    $r .= $chunk; // Too big, no whitespace: bail.
     
    31223122                    (?=\S{1,2000}\s)                               # Limit to URLs less than about 2000 characters long.
    31233123                    [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+         # Non-punctuation URL character.
    3124                     (?:                                            # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character.
     3124                    (?:                                            # Unroll the Loop: Only allow punctuation URL character if followed by a non-punctuation URL character.
    31253125                        [\'.,;:!?)]                                    # Punctuation URL character.
    31263126                        [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++         # Non-punctuation URL character.
    31273127                    )*
    31283128                )
    3129                 (\)?)                                          # 3: Trailing closing parenthesis (for parethesis balancing post processing).
     3129                (\)?)                                          # 3: Trailing closing parenthesis (for parenthesis balancing post processing).
    31303130            ~xS';
    31313131            /*
Note: See TracChangeset for help on using the changeset viewer.