WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

#1008 closed defect (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:

  1. On any WordCamp site, go to Appearance → Fonts.
  2. 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');

  1. 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.

Change History (3)

#1 @andywashere
4 years ago

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] );

#3 @kovshenin
4 years ago

  • Owner set to kovshenin
  • Resolution set to fixed
  • Status changed from new to closed

In 1522:

WordCamp.org: Add support for HTTPS in the WordCamp Fonts plugin.

Fixes #1008
Props andywashere

Note: See TracTickets for help on using tickets.