[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
Thu Jun 19 01:05:58 UTC 2025


#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:  6.9
Component:  Editor                               |     Version:  6.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-test-info has-         |     Focuses:  ui
  screenshots reporter-feedback                  |
-------------------------------------------------+-------------------------

Comment (by wildworks):

 @SirLouen Thanks for the testing.

 After further testing, I found this test to be very unstable.

 My guess is that this is an issue, possibly with file uploads.

 After following the steps I have shown you, check the source code on the
 frontend - the font family itself should be defined correctly.

 {{{
 <style class='wp-fonts-local'>
 <!-- Some other fonts definisions -->
 @font-face{font-family:"O'Reilly Sans";font-style:normal;font-weight:400
 ;font-display:fallback;src:url('http://localhost:8889/wp-
 content/uploads/fonts/O-Reilly-Sans-Regular.ttf') format('truetype');}
 </style>
 }}}

 Try accessing http://localhost:8889/wp-content/uploads/fonts/O-Reilly-
 Sans-Regular.ttf, which is indicated by this definition. In my
 environment, for some reason, the font could not be found.

 I used [https://wordpress.org/plugins/wp-file-manager/ the Font Manager
 plugin] to monitor whether the font file was actually uploaded. Strangely,
 the uploaded font may disappear immediately. See the video below:


 https://i.gyazo.com/a10898228bc4290f0b77442a5449de7e.mp4

 Here is what I discovered:

 - This problem does not occur with common font files that do not contain
 single quotes.
 - After repeatedly deleting and updating the font, the font becomes
 available for upload.
 - This problem also occurs in trunk.

 In conclusion, I think this behavior is either a niche bug related to the
 font file upload process that has existed in trunk, or there is some
 mistake in the font I prepared.

 Either way, this patch does not change anything in the font file upload
 process, so I think it is safe.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63568#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list