[wp-trac] [WordPress Trac] #63568: WP_Font_Face: Font names that contain single quotes are not wrapped in double quotes
WordPress Trac
noreply at wordpress.org
Fri Mar 6 18:08:33 UTC 2026
#63568: WP_Font_Face: Font names that contain single quotes are not wrapped in
double quotes
-------------------------------------------------+-------------------------
Reporter: wildworks | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future
| Release
Component: Editor | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch has-test-info has- | Focuses: ui, css
screenshots has-unit-tests needs-testing dev- |
feedback |
-------------------------------------------------+-------------------------
Comment (by jonsurrell):
[https://github.com/WordPress/wordpress-develop/pull/11193 PR 11193] fixes
just the font upload in my testing.
It takes the `fontFamily` sent in the REST API and transforms it into a
CSS string with CSS Unicode escapes for problematic characters. The REST
API description for `fontFamily` is "CSS font-family value." It does not
seem like that's the actual behavior, certainly the Gutenberg client is
not sending a CSS value in many circumstances. Perhaps "CSS" was used to
indicate that it's for the CSS property and not that it's a string of CSS
source. The PR will clarify the description that it should be a ''plain
string''.
This seems like appropriate behavior.
This fix only focuses on font uploads like are described in this ticket.
This fix should be resilient to things like the `,`-split-and-sanitize
behavior. [#comment:51 Other questions about the font system are not
considered.]
-----
I attempted to send an actual, escaped CSS string in the REST request in
https://github.com/WordPress/gutenberg/pull/76253, but the value is then
used in UI which results in escaped CSS strings appearing in dropdowns.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63568#comment:54>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list