WordPress.org

Make WordPress Core

Ticket #7045: 7045.diff

File 7045.diff, 731 bytes (added by kovshenin, 6 years ago)
  • wp-includes/shortcodes.php

     
    254254 */
    255255function shortcode_parse_atts($text) {
    256256        $atts = array();
    257         $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
     257        $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|=?"([^"]*)"(?:\s|$)|=?(\S+)(?:\s|$)/';
    258258        $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
    259259        if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
    260260                foreach ($match as $m) {