Making WordPress.org

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's profile andywashere Owned by: kovshenin's profile 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
9 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
9 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.