From bc745f81a90dc48eb8266fd486d104b7604ed16a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 7 Jul 2015 23:59:24 +0000 Subject: [PATCH] Allow shortcode parameter names (attributes) to contain dashes. Props aaroncampbell, tyxla, izem Fixes #9405 Built from https://develop.svn.wordpress.org/trunk@33118 git-svn-id: http://core.svn.wordpress.org/trunk@33089 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/shortcodes.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index c399bb0065..b466612887 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -309,7 +309,7 @@ function do_shortcode_tag( $m ) { */ function shortcode_parse_atts($text) { $atts = array(); - $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; + $pattern = '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text); if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) { foreach ($match as $m) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5fedc059ef..b5c1ee0952 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-beta1-33117'; +$wp_version = '4.3-beta1-33118'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.