Make WordPress Core


Ignore:
Timestamp:
02/20/2024 07:09:43 AM (10 months ago)
Author:
youknowriad
Message:

Editor: Format and sanitize font family names according the CSS spec.

This fixes two bugs in the font library.

  • Fonts using special characters were not being rendered properly in the frontend.
  • Allows the ability to use generic() in font family names.

Props mmaattiiaass, nithins53, kafleg, vivekawsm, swissspidy, audrasjb.
Fixes #60537.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/fonts/font-library/wpFontCollection/getData.php

    r57539 r57657  
    160160                        array(
    161161                            'font_family_settings' => array(
    162                                 'fontFamily' => 'Open Sans, sans-serif',
     162                                'fontFamily' => '"Open Sans", sans-serif',
    163163                                'slug'       => 'open-sans',
    164164                                'name'       => 'Open Sans',
Note: See TracChangeset for help on using the changeset viewer.