Make WordPress Core


Ignore:
Timestamp:
05/31/2017 10:03:02 PM (8 years ago)
Author:
azaozz
Message:

TinyMCE: Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets.

Fixes #40893.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r40583 r40862  
    528528
    529529                if ( ! empty( $editor_styles ) ) {
     530                    // Force urlencoding of commas.
     531                    foreach ( $editor_styles as $key => $url ) {
     532                        if ( strpos( $url, ',' ) !== false ) {
     533                            $editor_styles[ $key ] = str_replace( ',', '%2C', $url );
     534                        }
     535                    }
     536
    530537                    $mce_css .= ',' . implode( ',', $editor_styles );
    531538                }
Note: See TracChangeset for help on using the changeset viewer.