Skip to content

Commit 3cdc7e1

Browse files
committed
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
1 parent 1f741ff commit 3cdc7e1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/wp-includes/class-wp-editor.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@ public static function editor_settings($editor_id, $set) {
527527
$editor_styles = get_editor_stylesheets();
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
}
532539

0 commit comments

Comments
 (0)