aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-11-27 10:47:35 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-11-27 10:47:35 +0000
commit6b92f0e17f653aefaf7d05badbb80770dc91a3c1 (patch)
treea39322f24a82e90f29d49d713129494fdcc8c3ad /scripts
parent2820b6fd77c3ae7d6a3eaeb31e6b7bfbdf4e8e40 (diff)
downloadpmwiki.svn-6b92f0e17f653aefaf7d05badbb80770dc91a3c1.tar.bz2
UrlApprovals allow https: URLs if the http: URL for the same domain is approved (cont.)
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4536 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'scripts')
-rw-r--r--scripts/urlapprove.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/urlapprove.php b/scripts/urlapprove.php
index 57c24b08..2d345ec2 100644
--- a/scripts/urlapprove.php
+++ b/scripts/urlapprove.php
@@ -83,8 +83,8 @@ function ReadApprovedUrls($pagename) {
$apage = ReadPage($pn, READPAGE_CURRENT);
preg_match_all("/$ApproveUrlPattern/",strval(@$apage['text']),$match);
foreach($match[0] as $a) {
- $a = preg_replace('!^http://!', 'https?://', $a);
- $WhiteUrlPatterns[] = preg_quote($a,'!');
+ $qa = preg_quote($a,'!');
+ $WhiteUrlPatterns[] = preg_replace('!^http\\:!', 'https?:', $qa);
}
StopWatch("ReadApprovedUrls $pn end");
}