Opened 9 years ago
Closed 9 years ago
#1008 closed defect (bug) (fixed)
Fonts Plugin: Unable to add Secure URL for Google Fonts under Appearance > Fonts
Reported by: | andywashere | Owned by: | kovshenin |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | WordCamp Site & Plugins | Keywords: | |
Cc: |
Description
Steps to reproduce:
- On any WordCamp site, go to Appearance → Fonts.
- Paste in a Google Web Fonts @import rule with an
https://
URL, e.g.:
@import url('https://fonts.googleapis.com/css?family=Titillium+Web:400,700');
- Click Save Changes.
After changes are saved, the https://
in the URL is changed to http://
. Since WordCamp sites are now forcing https, this causes the font not to be loaded in some browsers, due to an http/https mismatch.
Note: See
TracTickets for help on using
tickets.
It looks to be the
esc_url_raw
on line 123 of wc-fonts.php that is forcing http:https://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-fonts/wc-fonts.php#L123
The line should probably be changed to:
if ( $matches ) $url = esc_url_raw( 'https://' . $matches[0] );