From 7db0eb7b433051d9d3d4d50c0c2be83d8163a720 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 3 Feb 2017 14:11:23 -0500 Subject: [PATCH] Allow https Include optional s on end of http --- glm-blocks.php | 2 +- models/block.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm-blocks.php b/glm-blocks.php index ecaca76..a3c03f7 100644 --- a/glm-blocks.php +++ b/glm-blocks.php @@ -1,7 +1,7 @@ Author URI: http://www.gaslightmedia.com diff --git a/models/block.php b/models/block.php index 2fd4649..822bb17 100644 --- a/models/block.php +++ b/models/block.php @@ -240,7 +240,7 @@ class glm_models_block break; case 'url': if ($custom['glm_block_ext_url'][0] != '') { - $block->url = (preg_match('/^http:\/\//', $custom['glm_block_ext_url'][0])) + $block->url = (preg_match('/^https?:\/\//', $custom['glm_block_ext_url'][0])) ? $custom['glm_block_ext_url'][0] : 'http://' . $custom['glm_block_ext_url'][0]; $block->externalUrl = true; -- 2.17.1