• Resolved linux4me2

    (@linux4me2)


    In Firefox 120.0.1 on two different machines, I’m getting the following error in Console:

    downloadable font: rejected by sanitizer (font-family: "Genericons" style:normal weight:400 stretch:100 src index:0) source: https://thedomain.com/wp-content/themes/twentythirteen/genericons/font/genericons-regular-webfont.eot

    I’ve verified that the path to the file is correct, and, according to the file command on the server, the mime-type is:

    $ file --mime-type genericons-regular-webfont.eot 
    genericons-regular-webfont.eot: application/vnd.ms-fontobject

    That seems to be the correct mime-type for the EOT file according to this article.

    Any idea how to fix this error?

Viewing 1 replies (of 1 total)
  • Thread Starter linux4me2

    (@linux4me2)

    I’ve done some more investigating, and I’m not sure I would call this an error. According to this article, EOT files are a Microsoft thing, and aren’t even supported outside of IE/Edge.

    Since all (most?) modern browsers support WOFF font files, and those are loaded too with Twenty Thirteen, my workaround was to just comment out the code in /wp-content/themes/twentythirteen/genericons/genericons.css that loads the EOT file:

    /*
    @font-face {
        font-family: 'Genericons';
        src: url('font/genericons-regular-webfont.eot');
    }
    */

    That prevents the error in Firefox, and as far as I have been able to tell, doesn’t prevent any Genericons from loading.

    I don’t like modifying the theme files since they’ll potentially be overwritten in an update, but I’m going to mark this thread as resolved anyway since I have a workable solution.

Viewing 1 replies (of 1 total)
  • The topic ‘Downloadable Font: Rejected by Sanitizer’ is closed to new replies.