Skip to content

Preload Fonts: improve detection of external domains #3276

Description

@webtrainingwheels

The Preload Fonts setting is for locally, or CDN-hosted fonts only.

However customers are trying really hard to preload external fonts :)

Steps to reproduce

  • Enter: fonts.gstatic.com/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2

  • This does not get santized correctly and instead of being removed, it becomes:
    /fonts.gstatic.com/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2

  • /fonts.gstatic.com/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 can also be entered directly and it is saved as-is.

  • On the front end of the site, this results in:
    https://www.example.org/fonts.gstatic.com/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions