Might as well put a $limit on preg_replace here

Since there will (should) never be more than one ^http in that string anyway.
This commit is contained in:
Mikael Nordfeldth 2016-01-11 18:26:44 +01:00
parent 5b2b969a77
commit c1f22f106b
1 changed files with 1 additions and 1 deletions

View File

@ -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;