Make WordPress Core

Ticket #29557: 29557-idea-1.2.diff

File 29557-idea-1.2.diff, 2.8 KB (added by miqrogroove, 10 years ago)

Unit test typo.

  • src/wp-includes/formatting.php

     
    214214                . '(?:-->)?';   // End of comment. If not found, match all input.
    215215
    216216        $shortcode_regex =
    217                   '\['          // Find start of shortcode.
    218                 . '[\/\[]?'     // Shortcodes may begin with [/ or [[
    219                 . '[^\s\/\[\]]' // No whitespace before name.
    220                 . '[^\[\]]*+'   // Shortcodes do not contain other shortcodes. Possessive critical.
    221                 . '\]'          // Find end of shortcode.
    222                 . '\]?';        // Shortcodes may end with ]]
     217                  '\['            // Find start of shortcode.
     218                . '[\/\[]?'       // Shortcodes may begin with [/ or [[
     219                . '[^\s\/\[\]<>]' // No whitespace before name.
     220                . '[^\[\]<>]*+'   // Shortcodes do not contain other shortcodes. Possessive critical.
     221                . '\]'            // Find end of shortcode.
     222                . '\]?';          // Shortcodes may end with ]]
    223223
    224224        $regex =
    225225                  '/('                   // Capture the entire match.
  • tests/phpunit/tests/formatting/WPTexturize.php

     
    11971197                        ),
    11981198                        array(
    11991199                                '[is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]', // HTML corruption is a known bug.  See tickets #12690 and #29557.
    1200                                 '[is it wise to <a title="allow user content ] here? hmm&#8221;> maybe </a> ]',
     1200                                '[is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]',
    12011201                        ),
    12021202                        array(
    12031203                                '[caption - is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]',
    1204                                 '[caption - is it wise to <a title="allow user content ] here? hmm&#8221;> maybe </a> ]',
     1204                                '[caption &#8211; is it wise to <a title="allow user content ] here? hmm"> maybe </a> ]',
    12051205                        ),
    12061206                        array(
    12071207                                '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]',
     
    12411241                        ),
    12421242                        array(
    12431243                                '[gallery <br ... /> ...]', // This tag is still valid. Shortcode 'attributes' are not considered in the initial parsing of shortcodes, and HTML is allowed.
    1244                                 '[gallery <br ... /> ...]',
     1244                                '[gallery <br ... /> &#8230;]',
    12451245                        ),
    12461246                        array(
    12471247                                '<br [gallery ...] ... />',
     
    12811281                        ),
    12821282                        array(
    12831283                                '[[gallery <br ... /> ...]]', // This gets parsed as an escaped shortcode with embedded HTML.  Brains may explode.
    1284                                 '[[gallery <br ... /> ...]]',
     1284                                '[[gallery <br ... /> &#8230;]]',
    12851285                        ),
    12861286                        array(
    12871287                                '<br [[gallery ...]] ... />',
     
    17791779                        ),
    17801780                        array(
    17811781                                '[gal>ery ...]',
    1782                                 '[gal>ery ...]',
     1782                                '[gal>ery &#8230;]',
    17831783                        ),
    17841784                        array(
    17851785                                '[randomthing param="test"]',