Make WordPress Core


Ignore:
Timestamp:
12/26/2015 04:47:58 AM (9 years ago)
Author:
dd32
Message:

Shortcodes: = is a reserved character in shortcode names, mark it as such.

This allows for shortcodes such as [shortcode=attribute] to work, which while never intentionally supported were widely used in the pre-shortcode days.

Merges [36097] to the 4.4 branch, minus a string change.
Props aaroncampbell.
Fixes #34939.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/tests/phpunit/tests/shortcode.php

    r35244 r36098  
    648648    }
    649649
     650    /**
     651     * @ticket 34939
     652     *
     653     * Test the (not recommended) [shortcode=XXX] format
     654     */
     655    function test_unnamed_attribute() {
     656        $out = do_shortcode('[dumptag=https://wordpress.org/]');
     657        $expected = "0 = =https://wordpress.org\n";
     658        $this->assertEquals($expected, $out);
     659    }
    650660}
Note: See TracChangeset for help on using the changeset viewer.