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.

Props aaroncampbell.
Fixes #34939 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@36097 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2015-12-26 04:45:26 +00:00
parent bb0d1af58f
commit a1cd9049d9
3 changed files with 16 additions and 6 deletions

View File

@@ -647,4 +647,14 @@ EOF;
}
/**
* @ticket 34939
*
* Test the (not recommended) [shortcode=XXX] format
*/
function test_unnamed_attribute() {
$out = do_shortcode('[dumptag=https://wordpress.org/]');
$expected = "0 = =https://wordpress.org\n";
$this->assertEquals($expected, $out);
}
}