From c1f22f106bda268e80efd784e60171831589c535 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 11 Jan 2016 18:26:44 +0100 Subject: [PATCH] Might as well put a $limit on preg_replace here Since there will (should) never be more than one ^http in that string anyway. --- lib/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/action.php b/lib/action.php index c2d60e11e9..29dbbc618e 100644 --- a/lib/action.php +++ b/lib/action.php @@ -1154,7 +1154,7 @@ class Action extends HTMLOutputter // lawsuit $url = $sslimage; } else if (preg_match('#^http://i.creativecommons.org/#', $image)) { // CC support HTTPS on their images - $url = preg_replace('/^http/', 'https', $image); + $url = preg_replace('/^http/', 'https', $image, 1); } else { // Better to show mixed content than no content $url = $image; -- 2.39.5