WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#47689 new defect (bug)

Editor Google Font Error 400

Reported by: jtsng8 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: has-patch dev-feedback
Focuses: administration Cc:
PR Number:

Description

Received Error 400 When site language is set to Traditional Chinese and in editor page

the plus sign is converted to %2B
https://fonts.googleapis.com/css?family=Noto%2BSerif%3A400%2C400i%2C700%2C700i&ver=5.2.2
https://fonts.googleapis.com/css?family=Noto+Serif%3A400%2C400i%2C700%2C700i&ver=5.2.2

Attachments (1)

47689.diff (626 bytes) - added by mukesh27 3 months ago.
Patch.

Download all attachments as: .zip

Change History (2)

#1 @mukesh27
3 months ago

  • Component changed from Options, Meta APIs to Script Loader
  • Focuses administration added
  • Keywords has-patch dev-feedback added
  • Version 5.2.2 deleted

Hi @jtsng8,

Welcome to WordPress Trac! Thanks for the ticket.

I have replicated the same issue in Chinese (Taiwan) language and _x function generated issue for this language.

In wp-includes/script-loader.php replace below code


$font_family = _x( 'Noto Serif:400,400i,700,700i', 'Google Font Name and Variants' );
Replace to
$font_family = __( 'Noto Serif:400,400i,700,700i' ); 

@mukesh27
3 months ago

Patch.

Note: See TracTickets for help on using tickets.