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

Fixes #40893.

git-svn-id: https://develop.svn.wordpress.org/trunk@40862 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2017-05-31 22:03:02 +00:00
parent 1f741fffb3
commit 3cdc7e14af
1 changed files with 7 additions and 0 deletions

View File

@ -527,6 +527,13 @@ final class _WP_Editors {
$editor_styles = get_editor_stylesheets();
if ( ! empty( $editor_styles ) ) {
// Force urlencoding of commas.
foreach ( $editor_styles as $key => $url ) {
if ( strpos( $url, ',' ) !== false ) {
$editor_styles[ $key ] = str_replace( ',', '%2C', $url );
}
}
$mce_css .= ',' . implode( ',', $editor_styles );
}