Make WordPress Core

Changeset 7768


Ignore:
Timestamp:
04/22/2008 08:54:32 PM (17 years ago)
Author:
ryan
Message:

Normalize whitespace when parsing shortcodes. Props azaozz. fixes #6562 for 2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/shortcodes.php

    r7700 r7768  
    116116    $atts = array();
    117117    $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
     118    $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
    118119    if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
    119120        foreach ($match as $m) {
Note: See TracChangeset for help on using the changeset viewer.