WordPress.org

Make WordPress Core

Ticket #6562: 6562.patch

File 6562.patch, 566 bytes (added by azaozz, 7 years ago)
  • shortcodes.php

     
    9898function shortcode_parse_atts($text) { 
    9999        $atts = array(); 
    100100        $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; 
     101        $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text); 
    101102        if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) { 
    102103                foreach ($match as $m) { 
    103104                        if (!empty($m[1]))