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:
parent
1f741fffb3
commit
3cdc7e14af
@ -527,6 +527,13 @@ final class _WP_Editors {
|
|||||||
$editor_styles = get_editor_stylesheets();
|
$editor_styles = get_editor_stylesheets();
|
||||||
|
|
||||||
if ( ! empty( $editor_styles ) ) {
|
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 );
|
$mce_css .= ',' . implode( ',', $editor_styles );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user